PlanetKitInboundDataSessionDelegate
@objc
public protocol PlanetKitInboundDataSessionDelegate
A delegate protocol for receiving inbound data session events in the PlanetKit framework.
-
Notifies the delegate that the inbound data session has been closed.
Declaration
Swift
func didClose(_ session: PlanetKitInboundDataSession, reason: PlanetKitDataSessionClosedReason)
Parameters
session
The inbound data session that was closed.
reason
The reason for closing the session.
-
Notifies the delegate that data has been received from a peer in the inbound data session.
Declaration
Swift
func didReceive(_ session: PlanetKitInboundDataSession, peerId: PlanetKitUserId, data: Data, timestamp: UInt64, offset: UInt64)
Parameters
session
The inbound data session that received the data.
peerId
The ID of the peer that sent the data.
data
The received data.
timestamp
The timestamp of the received data.
offset
The offset of the received data.