Teonet library
0.4.7
|
Websocket L0 connector class data. More...
#include <teo_ws.h>
Data Fields | |
ksnHTTPClass * | kh |
Pointer to ksnHTTPClass. More... | |
PblMap * | map |
Hash Map to store websocket clients. More... | |
void(* | destroy )(teoWSClass *kws) |
Destroy teonet HTTP module]. More... | |
teoLNullConnectData *(* | add )(teoWSClass *kws, void *nc_p, const char *server, const int port, char *login) |
Connect WS client with L0 server and add it to connected map and create READ watcher. More... | |
int(* | remove )(teoWSClass *kws, void *nc_p) |
int(* | handler )(teoWSClass *kws, int ev, void *nc_p, void *data, size_t data_length) |
Teonet L0 websocket event handler. More... | |
ssize_t(* | send )(teoWSClass *kws, void *nc_p, int cmd, const char *to_peer_name, void *data, size_t data_length) |
Send command to L0 server. More... | |
int(* | processMsg )(teoWSClass *kws, void *nc_p, void *data, size_t data_length) |
Process websocket message. More... | |
Websocket L0 connector class data.
teoLNullConnectData*(* teoWSClass::add)(teoWSClass *kws, void *nc_p, const char *server, const int port, char *login) |
Connect WS client with L0 server and add it to connected map and create READ watcher.
kws | Pointer to teoWSClass |
nc_p | Pointer to websocket connector |
server | L0 Server name or IP |
port | L0 Server port |
login | L0 server login |
void(* teoWSClass::destroy)(teoWSClass *kws) |
Destroy teonet HTTP module].
kws | Pointer to teoWSClass |
int(* teoWSClass::handler)(teoWSClass *kws, int ev, void *nc_p, void *data, size_t data_length) |
Teonet L0 websocket event handler.
kws | Pointer to teoWSClass |
ev | Event |
nc_p | Pointer to mg_connection structure |
data | Websocket data |
data_length | Websocket data length |
ksnHTTPClass* teoWSClass::kh |
Pointer to ksnHTTPClass.
PblMap* teoWSClass::map |
Hash Map to store websocket clients.
int(* teoWSClass::processMsg)(teoWSClass *kws, void *nc_p, void *data, size_t data_length) |
Process websocket message.
kws | Pointer to teoWSClass |
nc_p | Pointer to mg_connection structure |
data | Websocket data |
data_length | Websocket data length |
int(* teoWSClass::remove)(teoWSClass *kws, void *nc_p) |
ssize_t(* teoWSClass::send)(teoWSClass *kws, void *nc_p, int cmd, const char *to_peer_name, void *data, size_t data_length) |
Send command to L0 server.
Create L0 clients packet and send it to L0 server
con | Pointer to teoLNullConnectData |
cmd | Command |
peer_name | Peer name to send to |
data | Pointer to data |
data_length | Length of data |