IPWorks WebSockets 2020 C++ Edition

Questions / Feedback?

WebSocketConnectionDataFormat Property

The format of the data being sent.

Syntax

ANSI (Cross Platform)
int GetWebSocketConnectionDataFormat(int iConnectionId);
int SetWebSocketConnectionDataFormat(int iConnectionId, int iWebSocketConnectionDataFormat); Unicode (Windows) INT GetWebSocketConnectionDataFormat(INT iConnectionId);
INT SetWebSocketConnectionDataFormat(INT iConnectionId, INT iWebSocketConnectionDataFormat);

Possible Values

DF_AUTOMATIC(0), 
DF_TEXT(1),
DF_BINARY(2),
DF_PING(9),
DF_PONG(10)
- (int)webSocketConnectionDataFormat:(int)connectionId;
- (void)setWebSocketConnectionDataFormat:(int)connectionId:(int)newWebSocketConnectionDataFormat;

Possible Values

DF_AUTOMATIC(0), 
DF_TEXT(1),
DF_BINARY(2),
DF_PING(9),
DF_PONG(10)
#define PID_WEBSOCKETSERVER_WEBSOCKETCONNECTIONDATAFORMAT 7

IPWORKSWS_EXTERNAL void* IPWORKSWS_CALL IPWorksWS_WebSocketServer_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSWS_EXTERNAL int IPWORKSWS_CALL IPWorksWS_WebSocketServer_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
IPWORKSWS_EXTERNAL int IPWORKSWS_CALL IPWorksWS_WebSocketServer_CheckIndex(void *lpObj, int propid, int arridx);

Default Value

0

Remarks

The format of the data being sent. When data is sent over an established connection it is either considered as text or binary data. Text data is UTF-8 encoded. Binary data has no encoding associated with it.

Possible values are:

0 (dfAutomatic - default) The class will attempt to automatically determine the correct data format. This is suitable for most cases.
1 (dfText) The class will UTF-8 encode the specified data before sending. Data that has already been UTF-8 encoded may also be supplied.
2 (dfBinary) The class will send the data exactly as it is provided.
9 (dfPing) The class will send the ping with data exactly as it is provided.
10 (dfPong) The class will send the pong with data exactly as it is provided.

The ConnectionId parameter specifies the index of the item in the array. The size of the array is controlled by the WebSocketConnectionCount property.

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks WebSockets 2020 C++ Edition - Version 20.0 [Build 8155]