Next: Coserver functions, Previous: Client connections, Up: Embedding API [Contents][Index]
The functions described in this section deal with the creation,
destruction and other simple operations on socket structures called
svz_socket_t. See the description of each function for details
on which kind of socket it can handle and what they are for.
Return the number of currently connected sockets.
Write len bytes from the memory location pointed to by buf to the output buffer of the socket sock. Also try to flush the buffer to the socket of sock if possible. Return a non-zero value on error, which normally means a buffer overflow.
Print a formatted string on the socket sock. fmt is the
printf-style format string, which describes how to format the
optional arguments.
Resize the send and receive buffers for the socket sock. send_buf_size is the new size for the send buffer, recv_buf_size for the receive buffer. Note that data may be lost when the buffers shrink. For a new buffer size of 0 the buffer is freed and the pointer set to NULL.
Check for the kind of packet delimiter within sock and
and assign one of the default check_request routines
(one or more byte delimiters or a fixed size).
Afterwards this function will never ever be called again because the callback gets overwritten here.
Shorten the receive buffer of sock by len bytes.
Reduce the send buffer of sock by len bytes.
Next: Coserver functions, Previous: Client connections, Up: Embedding API [Contents][Index]