Buffered writing to a socket.
More...
Resets buffer index and error state.
- Parameters
-
sw | the writer that should be reset |
VTM_API int vtm_socket_writer_putm |
( |
struct vtm_socket_writer * |
sw, |
|
|
const char * |
src, |
|
|
size_t |
len |
|
) |
| |
Write memory chunk.
- Parameters
-
sw | the target writer |
src | the pointer to begin of memory chunk |
len | the length of the memory chunk |
- Returns
- VTM_OK if the write was successful
-
VTM_ERROR or other error code if the call failed OR any previous call already failed and the writer was not reset after the error
VTM_API int vtm_socket_writer_puts |
( |
struct vtm_socket_writer * |
sw, |
|
|
const char * |
str |
|
) |
| |
Write string.
- Parameters
-
sw | the target writer |
str | pointer to NUL-terminated string |
- Returns
- VTM_OK if the write was successful
-
VTM_ERROR or other error code if the call failed OR any previous call already failed and the writer was not reset after the error
Write single character.
- Parameters
-
sw | the target writer |
c | character to write |
- Returns
- VTM_OK if the write was successful
-
VTM_ERROR or other error code if the call failed OR any previous call already failed and the writer was not reset after the error
All data in buffer is written to socket.
- Parameters
-
- Returns
- VTM_OK if the data was successfully written to the socket
-
VTM_ERROR or other error code if the call failed OR any previous call already failed and the writer was not reset after the error