◆ nopoll_conn_get_msg()

noPollMsg* nopoll_conn_get_msg ( noPollConn conn)

Allows to get the next message available on the provided connection.

The function returns NULL in the case no message is still ready to be returned.

This function is design to not block the caller. However, connection socket must be in non-blocking configuration. If you have not configured anything, this is the default.

If the function blocks caller then the socket associated to noPollConn is configured to make blocking I/O (maybe because you configured like this or the socket was passed to another library that did such configuration or maybe because you are using nopoll_conn_new_with_socket).

Parameters
connThe connection where the read operation will take place.
Returns
A reference to a noPollMsg object or NULL if there is nothing available. In case the function returns NULL, check connection status with nopoll_conn_is_ok. If the function blocks the caller check socket configuration.

Referenced by nopoll_conn_read().