Annotation of mqtt/inc/mqttd.h, revision 1.2.2.1
1.2 misho 1: #ifndef __MQTTD_H
2: #define __MQTTD_H
3:
4:
5: struct tagStore {
6: char st_qos;
7: u_short st_msgid;
8:
9: mqtt_subscr_t st_subscr;
10:
11: TAILQ_ENTRY(tagStore) st_node;
12: };
13:
14: struct tagSession {
15: /* client session thread id */
16: pthread_t sess_tid;
1.2.2.1 ! misho 17: /* server dispatcher */
! 18: mqtt_srv_t *sess_srv;
1.2 misho 19:
20: /* client network settings */
21: int sess_sock;
22: u_short sess_ka;
23: /* client send retry in miliseconds, if client not receive message */
24: u_int sess_retry;
25: /* message work buffer */
26: mqtt_msg_t *sess_buf;
27:
28: /* authentication user info */
29: char sess_cid[MAX_CONNID];
30: char sess_user[MAX_CRED];
31: char sess_pass[MAX_CRED];
32: char sess_addr[64];
33:
34: /* connect flags */
35: char sess_clean;
36: struct {
37: char flag;
38: char qos;
39: char retain;
40: char *topic;
41: char *msg;
42: } sess_will;
43:
44: /* Data Storage by QoS class */
45: TAILQ_HEAD(qosStore, tagStore) sess_sndqueue;
46:
47: TAILQ_ENTRY(tagSession) sess_node;
48: };
49: typedef TAILQ_HEAD(, tagSession) sessions_t;
50:
51:
52: extern sessions_t Sessions;
53: extern sched_root_task_t *root;
54: extern sl_config cfg;
55: extern pthread_mutex_t mtx_sess, mtx_pub;
56:
57:
58: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>