IPWorks P2P 2020 Kotlin Edition

Questions / Feedback?

DataIn Event

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

Syntax

public open class DefaultTurnEventListener : TurnEventListener {
  ...
  public override fun dataIn(e: TurnDataInEvent) {}
  ...
}

public class TurnDataInEvent {
  val peerIP: String?
  val peerPort: Int
  val channelId: String?
  val data: ByteArray?
}

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 component. 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) 2021 /n software inc. - All rights reserved.
IPWorks P2P 2020 Kotlin Edition - Version 20.0 [Build 7941]