iOS SDK API Reference

Instance Methods | Properties | List of all members
SKWConnection Class Reference

Base class of SKWDataConnection and SKWMediaConnection. More...

#import <SKWConnection.h>

Inheritance diagram for SKWConnection:
SKWDataConnection SKWMediaConnection

Instance Methods

(void) - getStats:
 Get statistics of the connection. More...
 

Properties

NSString *__nullable connectionId
 Connection ID.
 
NSString *__nullable metadata
 Any type of metadata associated with the connection, passed in by whoever initiated the connection.
 
BOOL isOpen
 This is true if the connection is open and ready for read/write.
 
NSString *__nullable peer
 The ID of the peer on the other end of this connection.
 
NSString *__nullable type
 For type of connection.
 
NSString *__nullable label
 The optional label passed in or assigned by PeerJS when the connection was initiated.
 
BOOL reliable
 Whether the underlying data channels are reliable; defined when the connection was initiated.
 
SKWSerializationEnum serialization
 The serialization format of the data sent over the connection. More...
 
SKWPeer *__nullable provider
 Provider PeerObjC object.
 

Detailed Description

Base class of SKWDataConnection and SKWMediaConnection.

Method Documentation

◆ getStats:

- (void) getStats: (SKWConnectionGetStatsCallback __nullable)  callback

Get statistics of the connection.

Parameters
callbackCallback block literal
SKWMediaConnection *connection;
[connection getStats:^(NSArray * _Nullable stats) {
// Do something
}];

Property Documentation

◆ serialization

- (SKWSerializationEnum) serialization
readnonatomicassign

The serialization format of the data sent over the connection.

Can be binary (default), binary-utf8, json, or none.

SKWMediaConnection
Alternative class as MediaConnection.
Definition: SKWMediaConnection.h:52
-[SKWConnection getStats:]
void getStats:(SKWConnectionGetStatsCallback __nullable callback)
Get statistics of the connection.