PlanetKitOutboundDataSession
public class PlanetKitOutboundDataSession : NSObject
A class representing an outbound data session in the PlanetKit framework.
-
The unique identifier of the data session stream.
Declaration
Swift
@objc public private(set) var streamId: PlanetKitDataSessionStreamId { get }
-
The type of the data session.
Declaration
Swift
@objc public private(set) var type: PlanetKitDataSessionType { get }
-
The current offset of the data session.
Declaration
Swift
@objc public private(set) var offset: UInt64 { get }
-
The peer ID associated with the data session.
Remark
This property is only available in the conference.Declaration
Swift
@objc public private(set) var peerId: PlanetKitUserId? { get }
-
The subgroup name associated with the data session.
Remark
This property is only available in the conference.Declaration
Swift
@objc public var subgroupName: String? { get }
-
The delegate object that will receive callbacks for the data session.
Declaration
Swift
@objc public weak var delegate: PlanetKitOutboundDataSessionDelegate?
-
The completion handler type used by
PlanetKitDataSessionControllable.makeOutboundDataSession(streamId:type:delegate:completion:)
.Declaration
Swift
public typealias Completion = (_ dataSession: PlanetKitOutboundDataSession?, _ failReason: PlanetKitDataSessionFailReason) -> Void
-
Provides data to send over the data session.
Declaration
Swift
@objc public func send(data: Data, timestamp: UInt64) -> Bool
Parameters
data
Binary data to send
timestamp
User-defined mark data to identify
data
-
Changes the receiver peer target for the conference.
Remark
This function is only available in the conference. If you want to senddata
to all peers, then setpeerId
tonil
.Declaration
Swift
@objc public func changeDestination(streamId: PlanetKitDataSessionStreamId, peerId: PlanetKitUserId?, completion: @escaping (Bool) -> Void)