Functions
MyQtt Listener: Set of functions to create MQTT Listeners (server applications that accept incoming requests)

Functions

MYQTT_SOCKET myqtt_listener_accept (MYQTT_SOCKET server_socket)
 Public function that performs a TCP listener accept. More...
 
void myqtt_listener_accept_connection (MyQttConn *connection, axl_bool send_greetings)
 Common task to be done to accept a connection before greetings message is issued while working as a Listener. More...
 
MyQttConnmyqtt_listener_new (MyQttCtx *ctx, const char *host, const char *port, MyQttConnOpts *opts, MyQttListenerReady on_ready, axlPointer user_data)
 Allows to start a MQTT server on the provided local host address and port. More...
 
MyQttConnmyqtt_listener_new2 (MyQttCtx *ctx, const char *host, int port, MyQttConnOpts *opts, MyQttListenerReady on_ready, axlPointer user_data)
 Creates a new MyQtt Listener accepting incoming connections on the given host:port configuration, receiving the port configuration as an integer value. More...
 
MyQttConnmyqtt_listener_new6 (MyQttCtx *ctx, const char *host, const char *port, MyQttConnOpts *opts, MyQttListenerReady on_ready, axlPointer user_data)
 Creates a new TCP/IPv6 MyQtt Listener accepting incoming connections on the given host:port configuration. More...
 
void myqtt_listener_set_on_connection_accepted (MyQttCtx *ctx, MyQttOnAcceptedConnection on_accepted, axlPointer _data)
 Allows to configure a handler that is executed once a connection have been accepted. More...
 
axlPointer myqtt_listener_set_port_sharing_handling (MyQttCtx *ctx, const char *local_addr, const char *local_port, MyQttPortShareHandler handler, axlPointer user_data)
 Allows to install a port share handler that will be called to detect and activate alternative transports that must be enabled before activating normal MQTT session. More...
 
void myqtt_listener_shutdown (MyQttConn *listener, axl_bool also_created_conns)
 Allows to shutdown the listener provided and all connections that were created due to its function. More...
 
MYQTT_SOCKET myqtt_listener_sock_listen (MyQttCtx *ctx, const char *host, const char *port, axlError **error)
 Starts a generic TCP/IPv4 listener on the provided address and port. More...
 
MYQTT_SOCKET myqtt_listener_sock_listen6 (MyQttCtx *ctx, const char *host, const char *port, axlError **error)
 Starts a generic TCP/IPv6 listener on the provided address and port. More...
 
void myqtt_listener_unlock (MyQttCtx *ctx)
 Unlock the thread blocked at the myqtt_listener_wait. More...
 
void myqtt_listener_wait (MyQttCtx *ctx)
 Blocks a listener (or listeners) launched until myqtt finish. More...
 

Detailed Description