void nopoll_conn_set_on_ready ( noPollConn conn,
noPollActionHandler  on_ready,
noPollPtr  user_data 
)

Allows to configure a handler that is called when the connection provided is ready to send and receive because all WebSocket handshake protocol finished OK.

Unlike handlers configured at nopoll_ctx_set_on_open and nopoll_ctx_set_on_accept which get notified when the connection isn't still working (because WebSocket handshake wasn't finished yet), on read handlers configured here will get called just after the WebSocket handshake has taken place.

Parameters
connThe connection to configure.
on_readyThe handler to be called when a connection is fully ready to send and receive content because WebSocket handshake has finished. The function must return nopoll_true to accept the connection. By returning nopoll_false the handler is signalling to terminate the connection.
user_dataOptional user data pointer passed to the on ready handler.