wslay_event_recv() receives messages from peer. When receiving messages, it uses
wslay_event_recv_callback function. Single call of this function receives multiple messages until
wslay_event_recv_callback function sets error code WSLAY_ERR_WOULDBLOCK.
wslay_event_recv() calls following callback functions for their own event (See
wslay_event_context_server_init() or wslay_event_context_client_init() for the details of each
callbacks).
wslay_event_on_frame_recv_start_callback
Called when a new frame starts to be received.
wslay_event_on_frame_recv_start_callback
Called when a new frame starts to be received.
wslay_event_on_frame_recv_chunk_callback
Called when a chunk of frame payload is received.
wslay_event_on_frame_recv_end_callback
Called when a frame is completely received.
wslay_event_on_msg_recv_callback
Called when a message is completely received.
When close control frame is received, this function automatically queues close control frame. Also this
function calls wslay_event_set_read_enabled() with second argument 0 to disable further read from peer.
When ping control frame is received, this function automatically queues pong control frame.
In case of a fatal error which leads to negative return code, this function calls
wslay_event_set_read_enabled() with second argument 0 to disable further read from peer.