ThingWorx C SDK
Public Attributes | List of all members
twWs Struct Reference

Websocket entity structure definition. More...

#include <twWebsocket.h>

Public Attributes

struct twTlsClientconnection
 
uint32_t messageChunkSize
 
int32_t bytesNeeded
 
char read_state
 
uint16_t frameSize
 
char * frameBuffer
 
char * frameBufferPtr
 
unsigned char ws_header [64]
 
unsigned char * headerPtr
 
char * host
 
uint16_t port
 
char * api_key
 
char * gatewayName
 
char * gatewayType
 
unsigned char * security_key
 
uint32_t sessionId
 
char * resource
 
TW_MUTEX sendMessageMutex
 
TW_MUTEX sendFrameMutex
 
TW_MUTEX recvMutex
 
signed char connect_state
 
signed char isConnected
 
ws_cb on_ws_connected
 
ws_data_cb on_ws_binaryMessage
 
ws_data_cb on_ws_textMessage
 
ws_data_cb on_ws_ping
 
ws_data_cb on_ws_pong
 
ws_data_cb on_ws_close
 

Detailed Description

Websocket entity structure definition.

Member Data Documentation

char* twWs::api_key

The API key that will be used during an ensuing authentication process.

int32_t twWs::bytesNeeded

How many bytes we should read next.

signed char twWs::connect_state

The connection state of the websocket.

struct twTlsClient* twWs::connection

Pointer to a TLS client connection structure.

char* twWs::frameBuffer

Pointer to a frame buffer.

char* twWs::frameBufferPtr

A pointer to the websocket's frame buffer.

uint16_t twWs::frameSize

Max size of a websocket frame (not to be confused with max ThingWorx message size .

char* twWs::gatewayName

An optional name if the SDK is being used to develop a gateway application which allows multiple Things to connect through it. If not NULL this is used during the binding process.

char* twWs::gatewayType

An optional type if the SDK is being used to develop a gateway application which allows multiple Things to connect through it. If not NULL this is used during the binding process.

unsigned char* twWs::headerPtr

Pointer to a the header buffer.

char* twWs::host

The host name of the websocket server.

signed char twWs::isConnected

TRUE signifies the websocket is connected.

uint32_t twWs::messageChunkSize

Max size (in bytes) of multipart message chunk.

ws_data_cb twWs::on_ws_binaryMessage

Pointer to a callback function registered to be called when a complete binary message is received.

ws_data_cb twWs::on_ws_close

Pointer to a callback function registered to be called when the server closes the websocket connection.

ws_cb twWs::on_ws_connected

Pointer to a callback function registered to be called when the websocket connection is successfully established.

ws_data_cb twWs::on_ws_ping

Pointer to a callback function registered to be called when a Ping is received.

ws_data_cb twWs::on_ws_pong

Pointer to a callback function registered to be called when a Pong is received.

ws_data_cb twWs::on_ws_textMessage

Pointer to a callback function registered to be called when a complete text message is received.

uint16_t twWs::port

The port that the websocket server is listening on.

char twWs::read_state

READ_HEADER or READ_BODY.

TW_MUTEX twWs::recvMutex

A mutex for receiving data.

char* twWs::resource

The HTTP resource of the connection.

unsigned char* twWs::security_key

websocket security key.

TW_MUTEX twWs::sendFrameMutex

A mutex for sending frames.

TW_MUTEX twWs::sendMessageMutex

A mutex for sending messages.

uint32_t twWs::sessionId

Unique session ID.

unsigned char twWs::ws_header[64]

A buffer to receive websocket frame headers.


The documentation for this struct was generated from the following file: