IPWorks WebSockets 2020 .NET Edition

Questions / Feedback?

DataIn Event

Fired when data is received.

Syntax

public event OnDataInHandler OnDataIn;

public delegate void OnDataInHandler(object sender, WebsocketserverDataInEventArgs e);

public class WebsocketserverDataInEventArgs : EventArgs {
  public string ConnectionId { get; }
  public int DataFormat { get; }
  public string Text { get; }
public byte[] TextB { get; } public bool EOM { get; } }
Public Event OnDataIn As OnDataInHandler

Public Delegate Sub OnDataInHandler(sender As Object, e As WebsocketserverDataInEventArgs)

Public Class WebsocketserverDataInEventArgs Inherits EventArgs
  Public ReadOnly Property ConnectionId As String
  Public ReadOnly Property DataFormat As Integer
  Public ReadOnly Property Text As String
Public ReadOnly Property TextB As Byte() Public ReadOnly Property EOM As Boolean End Class

Remarks

The DataIn event provides the data received from the client identified by the ConnectionId parameter.

The incoming data is provided through the Text parameter.

The DataFormat parameter identifies the encoding (if any) of the data. Possible value are:

1 The data is UTF-8 encoded.
2 The data is binary and has no encoding.
10 The data is a pong packet.

The EOM parameter stands for End Of Message. By default the component will fire the DataIn event as data is received. Larger messages will be fragmented and will cause the event to fire multiple times. When EOM is true within the event this indicates the current fragment is also the final fragment of the message. The component may also be configured to buffer the message internally until the complete message is received. To enable this set BufferMessage to true.

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