69#define WSOP_Binary 0x82
71#define WSOP_Close 0x88
150 const char* path,
const char* origin);
struct SharkSslCon SharkSslCon
SharkSslCon is an opaque handle returned by function SharkSsl_createCon.
Definition: SharkSSL.h:553
int wscProtocolHandshake(WscState *wss, U32 tmo, const char *host, const char *path, const char *origin)
Upgrades (morphs) an HTTPS request/response pair to a WebSocket connection.
int wscSendCtrl(WscState *wss, U8 opCode, const U8 *buf, int len)
Sends a WebSocket control frame.
int wscRead(WscState *wss, U8 **buf, U32 timeout)
Wait for WebSocket frames sent by the server.
int wscClose(WscState *wss, int statusCode)
Sends a WebSocket close control frame to the server and closes the connection.
int wscSendBin(WscState *wss, U8 *buf, int len)
Sends binary data to server.
#define SOCKET
Infinite wait time option for socket read functions.
Definition: selib.h:102
WebSocket Client State Information, initialize using: WscState wss={0}; however, several members must...
Definition: WsClientLib.h:85
int sendBufLen
The send buffer length must be set to the sendBuf length.
Definition: WsClientLib.h:94
U8 * recBuf
The receive buffer must be set when not in secure mode.
Definition: WsClientLib.h:88
U8 * sendBuf
The send buffer must be set when not in secure mode.
Definition: WsClientLib.h:90
U8 isTimeout
Set when the read function returns due to a timeout.
Definition: WsClientLib.h:113
int bytesRead
Read frame data until: frameLen - bytesRead = 0.
Definition: WsClientLib.h:103
SOCKET * sock
The SOCKET object must be set.
Definition: WsClientLib.h:99
int frameLen
The WebSocket frame length.
Definition: WsClientLib.h:101
int recBufLen
The receive buffer length must be set to the recBuf length.
Definition: WsClientLib.h:92
SharkSslCon * scon
The SharkSslCon object must be set when using secure mode.
Definition: WsClientLib.h:97