WSCSession Class Reference

Inherits from NSObject
Declared in WSCSession.h

Overview

WSCSession represents a session between the client and the WebRTC Session Controller server. A client application is expected to create only one session towards the WebRTC Session Controller server for each user. A session may have one or more sub-sessions.

When receiving an incoming message from WebRTC Session Controller, the session dispatches the message to the appropriate package handler like WSCCallPackage in order to process the message.

  iceServerConfig

ICE Server Configuration.

@property (nonatomic, readonly) WSCIceServerConfig *iceServerConfig

Discussion

ICE Server Configuration.

Declared In

WSCSession.h

– initWithWSCSessionBuilder:

Returns an initialized WSCSession object with session builder.

- (instancetype)initWithWSCSessionBuilder:(WSCSessionBuilder *)builder

Parameters

builder

WSCSessionBuilder.

Discussion

Returns an initialized WSCSession object with session builder.

Declared In

WSCSession.h

– open

Opens the WebRTC Session Controller session based on initialization parameters to the Server. Status will be sent to WSCSessionObserverDelegate.

- (void)open

Discussion

Opens the WebRTC Session Controller session based on initialization parameters to the Server. Status will be sent to WSCSessionObserverDelegate.

Declared In

WSCSession.h

– close

Closes the connection towards the Server.

- (void)close

Discussion

Closes the connection towards the Server.

Declared In

WSCSession.h

– hibernate:

Initiates a hibernate request towards the server. The deviceToken should have been passed during the session creation process. If not, the request will fail.

- (void)hibernate:(WSCHibernateParams *)params

Parameters

params

Parameters for hibernation

Discussion

Initiates a hibernate request towards the server. The deviceToken should have been passed during the session creation process. If not, the request will fail.

Declared In

WSCSession.h

– suspend

Shuts down the currently open connection to the server and returns the state information.

- (NSString *)suspend

Return Value

NSString

Discussion

Shuts down the currently open connection to the server and returns the state information.

Declared In

WSCSession.h

– generateCorrelationId

Generates a correlation ID based on current outbound sequence number of this session. For example, if the current outbound sequence number is 100, “c101” is returned by this method

- (NSString *)generateCorrelationId

Discussion

Generates a correlation ID based on current outbound sequence number of this session. For example, if the current outbound sequence number is 100, “c101” is returned by this method

Declared In

WSCSession.h

– generateSubSessionId

Generates a random UUID subsession id according to RFC 4122 v4.

- (NSString *)generateSubSessionId

Discussion

Generates a random UUID subsession id according to RFC 4122 v4.

Declared In

WSCSession.h

– getPackage:

Returns a package from the WebRTC Session Controller session.

- (WSCPackage *)getPackage:(NSString *)packageType

Parameters

packageType

Package name for package to return

Discussion

Returns a package from the WebRTC Session Controller session.

Declared In

WSCSession.h

– getPackages

Returns all current packages in the WebRTC Session Controller session.

- (NSArray *)getPackages

Discussion

Returns all current packages in the WebRTC Session Controller session.

Declared In

WSCSession.h

– getSubSessionsByPackage:

Returns all sub-sessions for a registered package.

- (NSArray *)getSubSessionsByPackage:(NSString *)packageName

Parameters

packageName

Package name

Discussion

Returns all sub-sessions for a registered package.

Declared In

WSCSession.h

– getSubSession:

Returns a sub-session.

- (WSCSubSession *)getSubSession:(NSString *)subSessionId

Parameters

subSessionId

sub-session identifier for sub-session to return

Discussion

Returns a sub-session.

Declared In

WSCSession.h

– putSubSession:

Adds a sub-session to the session.

- (void)putSubSession:(WSCSubSession *)subSession

Parameters

subSession

sub-session to add

Discussion

Adds a sub-session to the session.

Declared In

WSCSession.h

– removeSubSession:

Removes a sub-session from the session.

- (void)removeSubSession:(NSString *)subSessionId

Parameters

subSessionId

sub-session identifier.

Discussion

Removes a sub-session from the session.

Declared In

WSCSession.h

– getSubSessions

Gets all the sub-sessions in this session.

- (NSArray *)getSubSessions

Discussion

Gets all the sub-sessions in this session.

Declared In

WSCSession.h

– getUsername

Gets the registered username associated with this session.

- (NSString *)getUsername

Discussion

Gets the registered username associated with this session.

Declared In

WSCSession.h

– getSessionId

Gets the session ID.

- (NSString *)getSessionId

Discussion

Gets the session ID.

Declared In

WSCSession.h

– getSessionState

Gets the session state.

- (WSCSessionState)getSessionState

Discussion

Gets the session state.

Declared In

WSCSession.h

– getProperty:

Gets the property value for a given property name.

- (NSObject *)getProperty:(NSString *)name

Parameters

name

Name for the property

Discussion

Gets the property value for a given property name.

Declared In

WSCSession.h

– sendMessage:

Sends a WebRTC Session Controller message frame to the session.

- (void)sendMessage:(WSCFrame *)frame

Parameters

frame

WebRTC Session Controller frame to be sent.

Discussion

Sends a WebRTC Session Controller message frame to the session.

Declared In

WSCSession.h

– init

Disallows init.

- (instancetype)init

Discussion

Disallows init.

Declared In

WSCSession.h