int vortex_frame_readline ( VortexConnection connection,
char *  buffer,
int  maxlen 
)

Read the next line, byte by byte until it gets a
or maxlen is reached.

Some code errors are used to manage exceptions (see return values)

Parameters
connectionThe connection where the read operation will be done.
bufferA buffer to store content read from the network.
maxlenmax content to read from the network.
Returns
values returned by this function follows: 0 - remote peer have closed the connection -1 - an error have happened while reading -2 - could read because this connection is on non-blocking mode and there is no data. n - some data was read.

References vortex_connection_get_ctx(), vortex_connection_get_host_ip(), vortex_connection_get_id(), vortex_connection_get_socket(), vortex_connection_is_ok(), and VortexProtocolError.