SKYLINKConnectionMessagesDelegate Protocol Reference

Conforms to NSObject
Declared in SKYLINKConnection.h

Overview

@protocol

Delegate methods are called on the main thread.

– connection:didReceiveServerMessage:isPublic:timeStamp:remotePeerId:

Called upon receiving a socket message (Signalling).

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveServerMessage:(null_unspecified id)message isPublic:(BOOL)isPublic timeStamp:(long long)timeStamp remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

message

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

isPublic

Flag to specify whether the message was a broadcast.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didReceiveP2PMessage:isPublic:timeStamp:remotePeerId:

Called upon receiving a P2P message (DataChannel).

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveP2PMessage:(null_unspecified id)message isPublic:(BOOL)isPublic timeStamp:(long long)timeStamp remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

message

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

isPublic

Flag to specify whether the message was a broadcast.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didReceiveData:remotePeerId:

Called upon receiving binary data on data channel.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveData:(null_unspecified NSData *)data remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

data

Binary data.

remotePeerId

The unique id of the remote peer.

Declared In

SKYLINKConnection.h