OpenTok C SDK
Typedefs | Functions
connection.h File Reference

Client connection. More...

#include "config.h"
#include "base.h"

Go to the source code of this file.

Typedefs

typedef struct otc_connection otc_connection
 

Functions

const char * otc_connection_get_id (const otc_connection *connection)
 
int64_t otc_connection_get_creation_time (const otc_connection *connection)
 
const char * otc_connection_get_data (const otc_connection *connection)
 
const char * otc_connection_get_session_id (const otc_connection *connection)
 
otc_connectionotc_connection_copy (const otc_connection *connection)
 
otc_status otc_connection_delete (otc_connection *connection)
 

Detailed Description

Client connection.

This file includes the type definition for a connection structure, representing a client connected to an OpenTok session, along with several function declarations related to client connections.

Typedef Documentation

◆ otc_connection

Type definition for a structure representing a client connected to an OpenTok session.

Function Documentation

◆ otc_connection_copy()

otc_connection* otc_connection_copy ( const otc_connection connection)

Makes a copy of this connection.

Parameters
connectionThe client connection to be copied
Returns
A copy of the connection. It is set to null if there is an error.

◆ otc_connection_delete()

otc_status otc_connection_delete ( otc_connection connection)

Releases resources associated with the connection.

Parameters
connectionThe client connection to release.
Returns
Return value indicating either error or success.

◆ otc_connection_get_creation_time()

int64_t otc_connection_get_creation_time ( const otc_connection connection)

Returns the timestamp for when the client connected to the OpenTok session.

Parameters
connectionThe client connection.
Returns
The time when the client connected to the OpenTok session.

◆ otc_connection_get_data()

const char* otc_connection_get_data ( const otc_connection connection)

Returns the data associated with the connection. You set this data when you create the token used for by the client to connect to the OpenTok session. See the Token Creation Overview developer guide.

Parameters
connectionThe client connection.
Returns
The connection data.

◆ otc_connection_get_id()

const char* otc_connection_get_id ( const otc_connection connection)

Returns the unique identifier for this connection.

Parameters
connectionThe client connection.
Returns
The unique identifier for this connection.

◆ otc_connection_get_session_id()

const char* otc_connection_get_session_id ( const otc_connection connection)

Gets the session ID for the session the connection is connected to.

Parameters
connectionThe client connection.
Returns
The session ID for the session.