DataIn Event

(TBD rename to DataIn.evt) Fires when data is received from a peer.

Syntax

public class DefaultTurnEventListener implements TurnEventListener {
  ...
  public void dataIn(TurnDataInEvent e) {}
  ...
}

public class TurnDataInEvent {
  public String peerIP;
  public int peerPort;
  public String channelId;
  public byte[] data;
}

Remarks

This event fires anytime data is received from a peer via the TURN server.

The PeerIP and PeerPort parameters reflect the IP address and port of the peer that sent the data.

The ChannelId parameter reflects Id of the channel that the server used to send the data to the class. This parameter will be empty if the server sent the data in an indication rather than over a channel.

The Data parameter contains the incoming data.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks P2P 2020 Java Edition - Version 20.0 [Build 8235]