MQTT Server 1.0.0
|
Public Attributes | |
u16(* | connect )(const struct utf8_string *client_id, const struct utf8_string *user_name, const struct utf8_string *pass_word, void **app_usr) |
void(* | publish )(const struct utf8_string *topic, const u8 *payload, u32 pay_len, bool dup, u8 qos, bool retain) |
void(* | disconn )(const void *app_usr, bool due2err) |
Member Data Documentation
u16(* mqtt_server_app_cbs::connect)(const struct utf8_string *client_id, const struct utf8_string *user_name, const struct utf8_string *pass_word, void **app_usr) |
Connection request from remote client - assess credentials. This routine presents, to the application, the information about the credentials of the remote client that is trying to establish a MQTT connection with the server. The application shall utilize these data in conjunction with its policy to either allow or deny connection to the server.
Should the application choose to allow the remote client to establish a MQTT connection, then it must provide in 'app-user' (place-holder), a handle that refers to the user of this connection. The server will provide this handle in follow-up routines to enable the application to refer to the associated connection in its implementation.
- Parameters:
-
[in] client_id UTF8 based ID of the remote client - is set to NULL to indicate a zero-length client id. [in] user_name UTF8 based user-name provided by the remote client. It is set to NULL if the client did not provide an user name [in] pass_word UTF8 based pass-word provided by the remote client. It is set to NULL if the client did not provide a pass-word [out] app_usr place-holder for application to provide a handle to the user of this specific connection / client.
- Returns:
- 16bit value for the variable header in the CONNACK message. The MSB in the return value refers to the 8bit parameter of the acknowledge flags and must be set 0. The LSB in the return value refers to the 8bit 'return code' parameter in the CONNACK message and must be set accordingly.
void(* mqtt_server_app_cbs::disconn)(const void *app_usr, bool due2err) |
Notify disconnection to the remote client. This routine is invoked by the server to declare to the application to a particular client has been terminated and follow-up, if needed, can now commence. This routine aids the application by indicating if an error condition had caused the disconnection.
- Parameters:
-
[in] app_usr handle to refer to the user of the connection in the application [in] due2err has the connection been closed due to an error?
- Returns:
- none
void(* mqtt_server_app_cbs::publish)(const struct utf8_string *topic, const u8 *payload, u32 pay_len, bool dup, u8 qos, bool retain) |
Indicate a PUBLISH message from the network. This routine presents, to the application, the topic and the related data along with other qualifiers published by one of the clients associated with this server. The application must enroll with the server the particular topic for which the data should be notified.
- Parameters:
-
[in] topic UTF8 topic Name for which data has been published [in] data_buf the published binary data for the topic [in] data_len the length of the binary data [in] dup is this a duplicate data from remote client? [in] qos quality of service of the message / data [in] retain should the server retain the data?
- Returns:
- none
The documentation for this struct was generated from the following file:
- D:/my_data/GIT/network_apps/netapps/mqtt/server/server_core.h
Generated on Mon Nov 17 2014 12:12:08 for MQTT Server by 1.7.4