Functions
noPoll Context: context handling functions used by the library

Functions

int nopoll_ctx_conns (noPollCtx *ctx)
 Allows to get number of connections currently registered. More...
 
nopoll_bool nopoll_ctx_find_certificate (noPollCtx *ctx, const char *serverName, const char **certificateFile, const char **privateKey, const char **optionalChainFile)
 Allows to find the certificate associated to the provided serverName. More...
 
noPollConnnopoll_ctx_foreach_conn (noPollCtx *ctx, noPollForeachConn foreach, noPollPtr user_data)
 Allows to iterate over all connections currently registered on the provided context, optionally stopping the foreach process, returning the connection reference selected if the foreach handler returns nopoll_true. More...
 
noPollCtxnopoll_ctx_new (void)
 Creates an empty Nopoll context. More...
 
nopoll_bool nopoll_ctx_ref (noPollCtx *ctx)
 Allows to acquire a reference to the provided context. More...
 
int nopoll_ctx_ref_count (noPollCtx *ctx)
 Allows to get current reference counting for the provided context. More...
 
nopoll_bool nopoll_ctx_set_certificate (noPollCtx *ctx, const char *serverName, const char *certificateFile, const char *privateKey, const char *optionalChainFile)
 Allows to install a certificate to be used in general by all listener connections working under the provided context. More...
 
void nopoll_ctx_set_on_accept (noPollCtx *ctx, noPollActionHandler on_accept, noPollPtr user_data)
 Allows to configure the accept handler that will be called when a connection is received but before any handshake takes place. More...
 
void nopoll_ctx_set_on_msg (noPollCtx *ctx, noPollOnMessageHandler on_msg, noPollPtr user_data)
 Allows to set a general handler to get notifications about a message received over any connection that is running under the provided context (noPollCtx). More...
 
void nopoll_ctx_set_on_open (noPollCtx *ctx, noPollActionHandler on_open, noPollPtr user_data)
 Allows to configure the on open handler, the handler that is called when it is received an incoming websocket connection and all websocket client handshake data was received (but still not required). More...
 
void nopoll_ctx_set_on_ready (noPollCtx *ctx, noPollActionHandler on_ready, noPollPtr user_data)
 Allows to configure a handler that is called when a connection is received and it is ready to send and receive because all WebSocket handshake protocol finished OK. More...
 
void nopoll_ctx_set_post_ssl_check (noPollCtx *ctx, noPollSslPostCheck post_ssl_check, noPollPtr user_data)
 Allows to configure a function that will implement an post SSL/TLS check. More...
 
void nopoll_ctx_set_protocol_version (noPollCtx *ctx, int version)
 Allows to change the protocol version that is send in all client connections created under the provided context and the protocol version accepted by listener created under this context too. More...
 
void nopoll_ctx_set_ssl_context_creator (noPollCtx *ctx, noPollSslContextCreator context_creator, noPollPtr user_data)
 Allows to configure the handler that will be used to let user land code to define OpenSSL SSL_CTX object. More...
 
void nopoll_ctx_unref (noPollCtx *ctx)
 allows to release a reference acquired to the provided noPoll context. More...
 

Detailed Description