IPWorks WebSockets 2020 Python Edition

Questions / Feedback?

on_data_in Event

Fired when data is received.

Syntax

class WebSocketProxyDataInEventParams(object):
  @property
  def connection_id() -> int: ...
  @property
  def text() -> bytes: ...
  @property
  def direction() -> int: ...

# In class WebSocketProxy:
@property
def on_data_in() -> Callable[[WebSocketProxyDataInEventParams], None]: ...
@on_data_in.setter
def on_data_in(event_hook: Callable[[WebSocketProxyDataInEventParams], None]) -> None: ...

Remarks

The on_data_in event fires when data is received from the WebSocket client or the web_socket_proxy_connection_forward_host. This event may be used to log communication between the client and web_socket_proxy_connection_forward_host. 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 web_socket_proxy_connection_forward_host.
1 (web_socket_proxy_connection_forward_host) The data originated from the web_socket_proxy_connection_forward_host and is being sent to the WebSocket client.

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