noPollConn* nopoll_listener_from_socket ( noPollCtx ctx,
NOPOLL_SOCKET  session 
)

Creates a websocket listener from the socket provided.

Parameters
ctxThe context where the listener will be associated.
sessionThe session to associate to the listener.
Returns
A reference to a listener connection object or NULL if it fails.

References nopoll_conn_ref(), nopoll_conn_unref(), NOPOLL_LEVEL_CRITICAL, NOPOLL_LEVEL_DEBUG, nopoll_mutex_create(), nopoll_new, nopoll_return_val_if_fail, NOPOLL_ROLE_LISTENER, nopoll_strdup(), and nopoll_strdup_printf().

Referenced by nopoll_conn_accept_socket().