IrisRtcDataSession Class Reference
Inherits from | IrisRtcJingleSession : NSObject |
---|---|
Declared in | IrisRtcDataSession.h |
Overview
The IrisRtcDataSession
is a class used to create and manage the data session using data channel.
This class provides the following apis
1) creating the data session : the session is created which involves getting the room Id from Iris backend by REST API call, creating room by using room id and creating the data channel to send text/image to remote participant.
2) joining the data session : the session is joined which involves joining the room using room id which is recieved in notification and creating the data channel to send text/image to remote participant
3) sending the image data
4) sending the raw data. Data can be compressed using different algorithm and can be sent.
5) sending the text messages
6) closing the session
useAnonymousRoom
private variable
@property (nonatomic) NSString *useAnonymousRoom
Discussion
private variable
Declared In
IrisRtcDataSession.h
– joinWithSessionId:delegate:
This method is called to join data session which involves starting a session and joining the room with room id which is received in notification to establish datachannel connection
- (void)joinWithSessionId:(NSString *)sessionId delegate:(id<IrisRtcDataSessionDelegate>)delegate
Parameters
sessionId |
room name that needs to be joined which is recieved in notification |
---|---|
delegate |
IrisRtcDataSession object for IrisRtcAudioSession,used to receive the callbacks. |
Discussion
This method is called to join data session which involves starting a session and joining the room with room id which is received in notification to establish datachannel connection
Declared In
IrisRtcDataSession.h
– sendImage:
This method is called to send image data
- (void)sendImage:(NSString *)filePath
Parameters
filePath |
image file path present on device. |
---|
Discussion
This method is called to send image data
Declared In
IrisRtcDataSession.h
– sendCompressedImage:
This method is called to send raw data. Data can be compressed using different algorithm and can be sent using this API.
- (void)sendCompressedImage:(NSData *)imgData
Parameters
imgData |
Raw compressed data |
---|
Discussion
This method is called to send raw data. Data can be compressed using different algorithm and can be sent using this API.
Declared In
IrisRtcDataSession.h
– sendText:
This method is called to send text messages
- (void)sendText:(NSString *)textMsg
Parameters
textMsg |
text message string |
---|
Discussion
This method is called to send text messages
Declared In
IrisRtcDataSession.h
– close
This method is called to close the session
- (void)close
Discussion
This method is called to close the session
Declared In
IrisRtcDataSession.h