IPWorks WebSockets 2020 C++ Edition

Questions / Feedback?

DataIn Event

Fired when data is received.

Syntax

ANSI (Cross Platform)
virtual int FireDataIn(WebSocketProxyDataInEventParams *e);
typedef struct {
int ConnectionId;
const char *Text; int lenText;
int Direction; int reserved; } WebSocketProxyDataInEventParams; Unicode (Windows) virtual INT FireDataIn(WebSocketProxyDataInEventParams *e);
typedef struct {
INT ConnectionId;
LPCSTR Text; INT lenText;
INT Direction; INT reserved; } WebSocketProxyDataInEventParams;
- (void)onDataIn:(int)connectionId :(NSData*)text :(int)direction;
#define EID_WEBSOCKETPROXY_DATAIN 3

virtual INT IPWORKSWS_CALL FireDataIn(INT &iConnectionId, LPSTR &lpText, INT &lenText, INT &iDirection);

Remarks

The DataIn event fires when data is received from the WebSocket client or the WebSocketProxyConnectionForwardHost. This event may be used to log communication between the client and WebSocketProxyConnectionForwardHost. The client is identified by the ConnectionId parameter. The incoming data is provided through the Text parameter.

The Direction parameter shows the originator of the data. Possible values are:

0 (Client) The data originated from the WebSocket client and is being sent to the WebSocketProxyConnectionForwardHost.
1 (WebSocketProxyConnectionForwardHost) The data originated from the WebSocketProxyConnectionForwardHost and is being sent to the WebSocket client.

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