IrisRtcConnection Class Reference
Inherits from | NSObject |
---|---|
Declared in | IrisRtcConnection.h |
Overview
The IrisRtcConnection
class used to manage the connection with
IRIS backend. It also involves making the necessary REST API
calls with event manager and other components to get the
resources as required for the connection.
The idea of this class is to keep a persistent connection with IRIS backend and hence it is a good practice to create the connection when app goes to foreground and disconnect when the app goes in background.
Other Methods
state
private variable used to acces the different IrisRtcConnectionStates.
@property (readonly) IrisRtcConnectionState state
Discussion
private variable used to acces the different IrisRtcConnectionStates.
Declared In
IrisRtcConnection.h
enableReconnect
private variable used to acces the different IrisRtcConnectionStates.
@property BOOL enableReconnect
Discussion
private variable used to acces the different IrisRtcConnectionStates.
Declared In
IrisRtcConnection.h
pingTimeInterval
private variable used to set pingtimeInterval.
@property (nonatomic) NSTimeInterval pingTimeInterval
Discussion
private variable used to set pingtimeInterval.
Declared In
IrisRtcConnection.h
pingTimeoutInterval
private variable used to set pingtimeoutInterval.
@property (nonatomic) NSTimeInterval pingTimeoutInterval
Discussion
private variable used to set pingtimeoutInterval.
Declared In
IrisRtcConnection.h
isAnonymousRoom
private variable used to set pingtimeoutInterval.
@property (nonatomic) BOOL isAnonymousRoom
Discussion
private variable used to set pingtimeoutInterval.
Declared In
IrisRtcConnection.h
+ sharedInstance
This method is used to get current instance of IrisRtcConnection object. The use of this method is to avoid creating multiple IriRtcConnection objects.
+ (IrisRtcConnection *)sharedInstance
Discussion
This method is used to get current instance of IrisRtcConnection object. The use of this method is to avoid creating multiple IriRtcConnection objects.
Declared In
IrisRtcConnection.h
Connect to IRIS backend
– connectUsingServer:irisToken:routingId:delegate:error:
This API is used to establish a connection with the IRIS backend.
- (BOOL)connectUsingServer:(NSString *)serverUrl irisToken:(NSString *)irisToken routingId:(NSString *)routingId delegate:(id _Nullable)delegate error:(NSError *_Nullable *)outError
Parameters
serverUrl |
The event manager URL. |
---|---|
irisToken |
A valid IRIS token details. |
routingId |
Self(or)Source routing ID. |
delegate |
The delegate object for IrisRtcConnection. The delegate will receive delegate messages during execution of the operation when output is generated and upon completion or failure of the operation. |
outError |
Provides error code and basic error description when any exception occured in api call. |
Discussion
This API is used to establish a connection with the IRIS backend.
Warning: Please use this api for outgoing calls. Please use connectUsingServer:irisToken:routingId:notificationPayload:delegate api for incoming calls.This api shoule be called only after Retrieving the IRIS token using auth manager,Routing Id through ID manager.
Declared In
IrisRtcConnection.h
Disconnect
– disconnect
This method is called to disconnect from IRIS backend.
- (void)disconnect
Return Value
Nothing
Discussion
This method is called to disconnect from IRIS backend.
Declared In
IrisRtcConnection.h
Reset JWT token
– setIrisToken:error:
This method is called to renew the JWT token.
- (BOOL)setIrisToken:(nonnull NSString *)token error:(NSError *_Nullable *)outError
Parameters
token |
JWT token. |
---|---|
outError |
Provides error code and basic error description when any exception occured in api call. |
Discussion
This method is called to renew the JWT token.
Declared In
IrisRtcConnection.h