PlanetKitDataSessionControllable
@objc
public protocol PlanetKitDataSessionControllable
A protocol that defines the controllable behavior of a data session in PlanetKit.
-
Creates an outbound data session with the specified stream ID, type, delegate, and completion closure.
Declaration
Swift
func makeOutboundDataSession(streamId: PlanetKitDataSessionStreamId, type: PlanetKitDataSessionType, delegate: PlanetKitOutboundDataSessionDelegate, completion: @escaping PlanetKitOutboundDataSession.Completion)
Parameters
streamId
The stream ID of the data session.
type
The type of the data session.
delegate
The delegate object that will receive callbacks from the data session.
completion
The closure that will be called when the data session creation is completed.
-
Creates an inbound data session with the specified stream ID, delegate, and completion closure.
Declaration
Swift
func makeInboundDataSession(streamId: PlanetKitDataSessionStreamId, delegate: PlanetKitInboundDataSessionDelegate, completion: @escaping PlanetKitInboundDataSession.Completion)
Parameters
streamId
The stream ID of the data session.
delegate
The delegate object that will receive callbacks from the data session.
completion
The closure that will be called when the data session creation is completed.
-
Unsupports an inbound data session with the specified stream ID.
Declaration
Swift
func unsupportInboundDataSession(streamId: PlanetKitDataSessionStreamId)
Parameters
streamId
The stream ID of the data session to be unsupported.
-
Retrieves the outbound data session with the specified stream ID.
Declaration
Swift
func getOutboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitOutboundDataSession?
Parameters
streamId
The stream ID of the data session.
Return Value
The outbound data session associated with the stream ID, or
nil
if not found. -
Retrieves the inbound data session with the specified stream ID.
Declaration
Swift
func getInboundDataSession(streamId: PlanetKitDataSessionStreamId) -> PlanetKitInboundDataSession?
Parameters
streamId
The stream ID of the data session.
Return Value
The inbound data session associated with the stream ID, or
nil
if not found.