CjConnectivity
Instance Methods | List of all members
<CjConnectivityDelegate> Protocol Reference
Inheritance diagram for <CjConnectivityDelegate>:

Instance Methods

(void) - msgReceived:otherDeviceId:
 Delegate gets called when a message has been received. More...
 
(void) - connectionEventReceived:otherDeviceId:connectionType:
 Delegate gets called when any type of event is received, other than receiving messages or data. More...
 
(void) - dataReceived:dataType:otherDeviceId:connectionType:
 Delegate gets called when data has been received. More...
 

Method Documentation

◆ connectionEventReceived:otherDeviceId:connectionType:()

- (void) connectionEventReceived: (CoConnectionEvent)  connectionEvent
otherDeviceId: (NSString *)  otherDeviceId
connectionType: (CoConnectionType)  connectionType 
required

Delegate gets called when any type of event is received, other than receiving messages or data.

Parameters
connectionEventType of event received.
otherDeviceIdThe unique ID of the destination device.
connectionTypeThe type of connection the event was received through.
Note
This delegate will be called each time with successful connectionEvent when one of the connection types gets established. For example, if the first data connection to get established is via server, then this callback will be called with CoConnectionTypeServer as connectionType. If a little bit later a peer-to-peer data connection is successfully established, then this callback will be called again with the CoConnectionTypeP2P connectionType.

◆ dataReceived:dataType:otherDeviceId:connectionType:()

- (void) dataReceived: (NSData *)  data
dataType: (CoDataType)  dataType
otherDeviceId: (NSString *)  otherDeviceId
connectionType: (CoConnectionType)  connectionType 
required

Delegate gets called when data has been received.

Parameters
dataData that was received.
dataTypeType of data that was received.
otherDeviceIdThe unique ID of the destination device.
connectionTypeThe type of connection the data was received through.

◆ msgReceived:otherDeviceId:()

- (void) msgReceived: (NSString *)  msg
otherDeviceId: (NSString *)  otherDeviceId 
required

Delegate gets called when a message has been received.

Parameters
msgMessage that was received.
otherDeviceIdThe unique ID of the destination device.

The documentation for this protocol was generated from the following file: