SKYLINKConnectionRemotePeerDelegate Protocol Reference

Conforms to NSObject
Declared in SKYLINKConnection.h
SKYLINKProtocol.h

Overview

@protocol

Delegate methods are called on the main thread.

– connection:didReceiveRemotePeerInRoomWithRemotePeerId:userInfo:

Called when receive info about remote Peer that just joined the room.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveRemotePeerInRoomWithRemotePeerId:(nonnull NSString *)remotePeerId userInfo:(null_unspecified id)userInfo

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the joining peer.

userInfo

User defined information. May be an NSString, NSDictionary or NSArray.

Declared In

SKYLINKConnection.h

– connection:didConnectWithRemotePeer:userInfo:hasDataChannel:

Called when a remote peer joins the room.

- (void)connection:(nonnull SKYLINKConnection *)connection didConnectWithRemotePeer:(null_unspecified NSString *)remotePeerId userInfo:(null_unspecified id)userInfo hasDataChannel:(BOOL)hasDataChannel

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the joining peer.

userInfo

User defined information. May be an NSString, NSDictionary or NSArray.

hasDataChannel

In case the peer enable data channel?

Declared In

SKYLINKConnection.h

– connection:didRefreshRemotePeerConnection:userInfo:hasDataChannel:isIceRestarted:

Called when receive info about a remote Peer that just refreshed its connection with us.

- (void)connection:(nonnull SKYLINKConnection *)connection didRefreshRemotePeerConnection:(null_unspecified NSString *)remotePeerId userInfo:(null_unspecified id)userInfo hasDataChannel:(BOOL)hasDataChannel isIceRestarted:(BOOL)isIceRestarted

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the joining peer.

userInfo

User defined information. May be an NSString, NSDictionary or NSArray.

isIceRestarted

Inccase the peer enable iceRestart?

Declared In

SKYLINKConnection.h

– connection:didReceiveRemotePeerUserData:remotePeerId:

Called upon receiving an update about a user Data.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveRemotePeerUserData:(null_unspecified id)userData remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

userData

User data. May be user name.

remotePeerId

The unique id of the remote peer.

Declared In

SKYLINKConnection.h

– connection:didOpenRemotePeerDataConnection:

Called upon receiving an update about a user info.

- (void)connection:(nonnull SKYLINKConnection *)connection didOpenRemotePeerDataConnection:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the remote peer.

Declared In

SKYLINKConnection.h

– connection:didDisconnectWithRemotePeer:userInfo:hasDataChannel:

Receive info about remote Peer that just disconnected with us.

- (void)connection:(nonnull SKYLINKConnection *)connection didDisconnectWithRemotePeer:(nonnull NSString *)remotePeerId userInfo:(null_unspecified id)userInfo hasDataChannel:(BOOL)hasDataChannel

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the peer.

userInfo

User defined information. May be an NSString, NSDictionary or NSArray.

hasDataChannel

In case the peer enable data channel?

Declared In

SKYLINKConnection.h

– connection:didReceiveRemotePeerLeaveRoom:userInfo:skylinkInfo:

Receive info about remote Peer that just left the room.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveRemotePeerLeaveRoom:(null_unspecified NSString *)remotePeerId userInfo:(null_unspecified id)userInfo skylinkInfo:(nullable NSDictionary *)skylinkInfo

Parameters

connection

The underlying connection object.

remotePeerId

The unique id of the remote peer.

userInfo

User info.

skylinkInfo

SkylinkInfo dictionary contains a code and a message from the underlying system.

Declared In

SKYLINKConnection.h

– connection:didErrorForRemotePeerConnection:remotePeerId:

Called when receive info about remote Peer whose connection with us has broken. This allows user the opportunity to decide how to respond, for e.g. user could choose to reconnect to room or refresh connection with remote Peer.

- (void)connection:(nonnull SKYLINKConnection *)connection didErrorForRemotePeerConnection:(nullable NSError *)error remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

error

Error in case the connection is unsuccessful.

remotePeerId

The unique id of the remote peer.

Declared In

SKYLINKConnection.h