Inherits from NSObject
Conforms to SocketIODelegate
Declared in RespokeSignalingChannel.h

Overview

The purpose of this class is to make a method call for each API call to the backend REST interface. This class takes care of App authentication, websocket connection, Endpoint authentication, and all App interactions thereafter.

Tasks

Properties

connected

@property BOOL connected
Discussion

Indicates if the signaling channel is currently connected to the cloud infrastructure

Declared In

RespokeSignalingChannel.h

delegate

@property (weak) id<RespokeSignalingChannelDelegate> delegate
Discussion

The delegate that should receive notifications from the RespokeSignalingChannelDelegate protocol

Declared In

RespokeSignalingChannel.h

Instance Methods

authenticate

- (void)authenticate
Discussion

Begin the authentication process

Declared In

RespokeSignalingChannel.h

disconnect

- (void)disconnect
Discussion

Disconnect the signaling channel from the cloud infrastructure

Declared In

RespokeSignalingChannel.h

initWithAppToken:baseURL:

- (instancetype)initWithAppToken:(NSString *)token baseURL:(NSString *)baseURL
Discussion

Initialize a new signaling channel instance

Parameters

token

The application token to use

baseURL

The base URL of the Respoke service

Return Value

The newly initialized instance

Declared In

RespokeSignalingChannel.h

registerPresence:successHandler:errorHandler:

- (void)registerPresence:(NSArray *)endpointList successHandler:(void ( ^ ) ( NSArray *))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Register to receive presence notifications for the specified list of endpoints

Parameters

endpointList

An array of endpoints to register presence with

successHandler

A block to call upon successful transmission, passing an array of initial presence information for those endpoints

errorHandler

A block to call upon an error, passing the error message

Declared In

RespokeSignalingChannel.h

sendRESTMessage:url:data:responseHandler:

- (void)sendRESTMessage:(NSString *)httpMethod url:(NSString *)url data:(NSDictionary *)data responseHandler:(void ( ^ ) ( id , NSString *))responseHandler
Discussion

Send a REST message through the websocket

Parameters

httpMethod

HTTP method to use

url

Destination URL

data

Data to transmit

responseHandler

Response handler to call upon completion

Declared In

RespokeSignalingChannel.h

sendSignalMessage:toEndpointID:toConnectionID:toType:ccSelf:successHandler:errorHandler:

- (void)sendSignalMessage:(NSObject *)message toEndpointID:(NSString *)toEndpointID toConnectionID:(NSString *)toConnectionID toType:(NSString *)toType ccSelf:(BOOL)ccSelf successHandler:(void ( ^ ) ( ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Send a signaling message through the websocket

Parameters

message

Message to send

toEndpointID

Destination endpoint ID

toConnectionID

Destination connection ID (or nil for broadcast)

toType

Destination type (or nil for ‘web’)

ccSelf

Flag indicating if other clients logged in as the same endpoint should be notified

successHandler

A block to call upon successful transmission

errorHandler

A block to call upon an error, passing the error message

Declared In

RespokeSignalingChannel.h