]>
git.proxmox.com Git - ceph.git/blob - ceph/src/civetweb/examples/websocket/WebSockCallbacks.h
2 #ifndef WEBSOCKCALLBACKS_H_INCLUDED
3 #define WEBSOCKCALLBACKS_H_INCLUDED
11 typedef struct tWebSockInfo
{
14 struct mg_connection
*conn
;
17 #define MAX_NUM_OF_WEBSOCKS (256)
18 typedef struct tWebSockContext
{
21 tWebSockInfo
*socketList
[MAX_NUM_OF_WEBSOCKS
];
25 void websock_init_lib(const struct mg_context
*ctx
);
26 void websock_exit_lib(const struct mg_context
*ctx
);
29 websock_send_broadcast(struct mg_context
*ctx
, const char *data
, int data_len
);
31 void websocket_ready_handler(struct mg_connection
*conn
, void *_ignored
);
32 int websocket_data_handler(struct mg_connection
*conn
,
37 void connection_close_handler(const struct mg_connection
*conn
, void *_ignored
);