SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
WsClientLib.h File Reference
#include "selib.h"

Go to the source code of this file.

Data Structures

struct  WscState
 WebSocket Client State Information, initialize using: WscState wss={0}; however, several members must be set. More...
 

Macros

#define WSC_DUAL
 
#define WSOP_Text   0x81
 Text. More...
 
#define WSOP_Binary   0x82
 Binary. More...
 
#define WSOP_Close   0x88
 RFC6455 5.5 - Control Frame - Close. More...
 
#define WSOP_Ping   0x89
 RFC6455 5.5 - Control Frame - Ping. More...
 
#define WSOP_Pong   0x8A
 RFC6455 5.5 - Control Frame - Pong. More...
 
#define WSC_TLS_AUTH_FAILED   -105
 TLS peer certificate or reference name was not fully authenticated. More...
 

Functions

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. More...
 
int wscSendBin (WscState *wss, U8 *buf, int len)
 Sends binary data to server. More...
 
int wscSendCtrl (WscState *wss, U8 opCode, const U8 *buf, int len)
 Sends a WebSocket control frame. More...
 
int wscClose (WscState *wss, int statusCode)
 Sends a WebSocket close control frame to the server and closes the connection. More...
 
int wscRead (WscState *wss, U8 **buf, U32 timeout)
 Wait for WebSocket frames sent by the server. More...
 

Macro Definition Documentation

◆ WSC_DUAL

#define WSC_DUAL