Amazon Kinesis Webrtc C SDK
Signaling.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SignalingClientInfoInternal
 
struct  ThreadTracker
 
struct  SignalingDiagnostics
 
struct  SignalingClient
 

Macros

#define SIGNALING_REQUEST_ID_HEADER_NAME   KVS_REQUEST_ID_HEADER_NAME ":"
 
#define SIGNALING_CLIENT_FROM_CUSTOM_DATA(h)   ((PSignalingClient) (h))
 
#define CUSTOM_DATA_FROM_SIGNALING_CLIENT(p)   ((UINT64) (p))
 
#define ICE_CONFIGURATION_REFRESH_GRACE_PERIOD   (30 * HUNDREDS_OF_NANOS_IN_A_SECOND)
 
#define SIGNALING_CLIENT_SHUTDOWN_TIMEOUT   ((2 + SIGNALING_SERVICE_API_CALL_TIMEOUT_IN_SECONDS) * HUNDREDS_OF_NANOS_IN_A_SECOND)
 
#define SIGNALING_CLIENT_STATE_UNKNOWN_STR   "Unknown"
 
#define SIGNALING_CLIENT_STATE_NEW_STR   "New"
 
#define SIGNALING_CLIENT_STATE_GET_CREDENTIALS_STR   "Get Security Credentials"
 
#define SIGNALING_CLIENT_STATE_DESCRIBE_STR   "Describe Channel"
 
#define SIGNALING_CLIENT_STATE_CREATE_STR   "Create Channel"
 
#define SIGNALING_CLIENT_STATE_GET_ENDPOINT_STR   "Get Channel Endpoint"
 
#define SIGNALING_CLIENT_STATE_GET_ICE_CONFIG_STR   "Get ICE Server Configuration"
 
#define SIGNALING_CLIENT_STATE_READY_STR   "Ready"
 
#define SIGNALING_CLIENT_STATE_CONNECTING_STR   "Connecting"
 
#define SIGNALING_CLIENT_STATE_CONNECTED_STR   "Connected"
 
#define SIGNALING_CLIENT_STATE_DISCONNECTED_STR   "Disconnected"
 
#define SIGNALING_CLIENT_STATE_DELETE_STR   "Delete"
 
#define SIGNALING_CLIENT_STATE_DELETED_STR   "Deleted"
 
#define SIGNALING_CLIENT_STATE_DESCRIBE_MEDIA_STR   "Describe Media Storage"
 
#define SIGNALING_CLIENT_STATE_JOIN_SESSION_STR   "Join Session"
 
#define SIGNALING_CLIENT_STATE_JOIN_SESSION_WAITING_STR   "Join Session Waiting"
 
#define SIGNALING_CLIENT_STATE_JOIN_SESSION_CONNECTED_STR   "Join Session Connected"
 
#define SIGNALING_ICE_CONFIG_REFRESH_ERROR_MSG   "Failed refreshing ICE server configuration with status code 0x%08x."
 
#define SIGNALING_RECONNECT_ERROR_MSG   "Failed to reconnect with status code 0x%08x."
 
#define SIGNALING_MAX_ERROR_MESSAGE_LEN   512
 
#define SIGNALING_ASYNC_ICE_CONFIG_REFRESH_DELAY   (50 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
 
#define LWS_PROTOCOL_COUNT   2
 
#define SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_LENGTH   2
 
#define SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_COUNT   MIN_HASH_BUCKET_COUNT
 
#define SIGNALING_API_LATENCY_CALCULATION(pClient, time, isCpApi)
 
#define SIGNALING_UPDATE_ERROR_COUNT(pClient, status)
 
#define IS_CURRENT_TIME_CALLBACK_SET(pClient)   ((pClient) != NULL && ((pClient)->signalingClientCallbacks.getCurrentTimeFn != NULL))
 
#define SIGNALING_GET_CURRENT_TIME(pClient)
 
#define DEFAULT_CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS   7
 
#define SIGNALING_STATE_MACHINE_NAME   (PCHAR) "SIGNALING"
 
#define TO_SIGNALING_CLIENT_HANDLE(p)   ((SIGNALING_CLIENT_HANDLE) (p))
 
#define FROM_SIGNALING_CLIENT_HANDLE(h)   (IS_VALID_SIGNALING_CLIENT_HANDLE(h) ? (PSignalingClient) (h) : NULL)
 

Typedefs

typedef struct __LwsCallInfoPLwsCallInfo
 
typedef STATUS(* SignalingApiCallHookFunc) (UINT64)
 
typedef struct SignalingClientInfoInternalPSignalingClientInfoInternal
 
typedef struct ThreadTrackerPThreadTracker
 
typedef struct SignalingDiagnostics PSignalingDiagnostics
 
typedef struct SignalingClientPSignalingClient
 

Functions

STATUS createSignalingSync (PSignalingClientInfoInternal, PChannelInfo, PSignalingClientCallbacks, PAwsCredentialProvider, PSignalingClient *)
 
STATUS freeSignaling (PSignalingClient *)
 
STATUS signalingSendMessageSync (PSignalingClient, PSignalingMessage)
 
STATUS signalingGetIceConfigInfoCount (PSignalingClient, PUINT32)
 
STATUS signalingGetIceConfigInfo (PSignalingClient, UINT32, PIceConfigInfo *)
 
STATUS signalingFetchSync (PSignalingClient)
 
STATUS signalingConnectSync (PSignalingClient)
 
STATUS signalingDisconnectSync (PSignalingClient)
 
STATUS signalingDeleteSync (PSignalingClient)
 
STATUS validateSignalingCallbacks (PSignalingClient, PSignalingClientCallbacks)
 
STATUS validateSignalingClientInfo (PSignalingClient, PSignalingClientInfoInternal)
 
STATUS validateIceConfiguration (PSignalingClient)
 
STATUS signalingStoreOngoingMessage (PSignalingClient, PSignalingMessage)
 
STATUS signalingRemoveOngoingMessage (PSignalingClient, PCHAR)
 
STATUS signalingGetOngoingMessage (PSignalingClient, PCHAR, PCHAR, PSignalingMessage *)
 
STATUS refreshIceConfiguration (PSignalingClient)
 
UINT64 signalingGetCurrentTime (UINT64)
 
STATUS awaitForThreadTermination (PThreadTracker, UINT64)
 
STATUS initializeThreadTracker (PThreadTracker)
 
STATUS uninitializeThreadTracker (PThreadTracker)
 
STATUS terminateOngoingOperations (PSignalingClient)
 
STATUS describeChannel (PSignalingClient, UINT64)
 
STATUS createChannel (PSignalingClient, UINT64)
 
STATUS getChannelEndpoint (PSignalingClient, UINT64)
 
STATUS getIceConfig (PSignalingClient, UINT64)
 
STATUS connectSignalingChannel (PSignalingClient, UINT64)
 
STATUS joinStorageSession (PSignalingClient, UINT64)
 
STATUS describeMediaStorageConf (PSignalingClient, UINT64)
 
STATUS deleteChannel (PSignalingClient, UINT64)
 
STATUS signalingGetMetrics (PSignalingClient, PSignalingClientMetrics)
 
STATUS configureRetryStrategyForSignalingStateMachine (PSignalingClient)
 
STATUS setupDefaultRetryStrategyForSignalingStateMachine (PSignalingClient)
 
STATUS freeClientRetryStrategy (PSignalingClient)
 

Macro Definition Documentation

◆ CUSTOM_DATA_FROM_SIGNALING_CLIENT

#define CUSTOM_DATA_FROM_SIGNALING_CLIENT (   p)    ((UINT64) (p))

◆ DEFAULT_CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS

#define DEFAULT_CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS   7

◆ FROM_SIGNALING_CLIENT_HANDLE

#define FROM_SIGNALING_CLIENT_HANDLE (   h)    (IS_VALID_SIGNALING_CLIENT_HANDLE(h) ? (PSignalingClient) (h) : NULL)

◆ ICE_CONFIGURATION_REFRESH_GRACE_PERIOD

#define ICE_CONFIGURATION_REFRESH_GRACE_PERIOD   (30 * HUNDREDS_OF_NANOS_IN_A_SECOND)

◆ IS_CURRENT_TIME_CALLBACK_SET

#define IS_CURRENT_TIME_CALLBACK_SET (   pClient)    ((pClient) != NULL && ((pClient)->signalingClientCallbacks.getCurrentTimeFn != NULL))

◆ LWS_PROTOCOL_COUNT

#define LWS_PROTOCOL_COUNT   2

◆ SIGNALING_API_LATENCY_CALCULATION

#define SIGNALING_API_LATENCY_CALCULATION (   pClient,
  time,
  isCpApi 
)
Value:
MUTEX_LOCK((pClient)->diagnosticsLock); \
if (isCpApi) { \
(pClient)->diagnostics.cpApiLatency = \
EMA_ACCUMULATOR_GET_NEXT((pClient)->diagnostics.cpApiLatency, SIGNALING_GET_CURRENT_TIME((pClient)) - (time)); \
} else { \
(pClient)->diagnostics.dpApiLatency = \
EMA_ACCUMULATOR_GET_NEXT((pClient)->diagnostics.dpApiLatency, SIGNALING_GET_CURRENT_TIME((pClient)) - (time)); \
} \
MUTEX_UNLOCK((pClient)->diagnosticsLock);
#define SIGNALING_GET_CURRENT_TIME(pClient)
Definition: Signaling.h:85

◆ SIGNALING_ASYNC_ICE_CONFIG_REFRESH_DELAY

#define SIGNALING_ASYNC_ICE_CONFIG_REFRESH_DELAY   (50 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

◆ SIGNALING_CLIENT_FROM_CUSTOM_DATA

#define SIGNALING_CLIENT_FROM_CUSTOM_DATA (   h)    ((PSignalingClient) (h))

◆ SIGNALING_CLIENT_SHUTDOWN_TIMEOUT

#define SIGNALING_CLIENT_SHUTDOWN_TIMEOUT   ((2 + SIGNALING_SERVICE_API_CALL_TIMEOUT_IN_SECONDS) * HUNDREDS_OF_NANOS_IN_A_SECOND)

◆ SIGNALING_CLIENT_STATE_CONNECTED_STR

#define SIGNALING_CLIENT_STATE_CONNECTED_STR   "Connected"

◆ SIGNALING_CLIENT_STATE_CONNECTING_STR

#define SIGNALING_CLIENT_STATE_CONNECTING_STR   "Connecting"

◆ SIGNALING_CLIENT_STATE_CREATE_STR

#define SIGNALING_CLIENT_STATE_CREATE_STR   "Create Channel"

◆ SIGNALING_CLIENT_STATE_DELETE_STR

#define SIGNALING_CLIENT_STATE_DELETE_STR   "Delete"

◆ SIGNALING_CLIENT_STATE_DELETED_STR

#define SIGNALING_CLIENT_STATE_DELETED_STR   "Deleted"

◆ SIGNALING_CLIENT_STATE_DESCRIBE_MEDIA_STR

#define SIGNALING_CLIENT_STATE_DESCRIBE_MEDIA_STR   "Describe Media Storage"

◆ SIGNALING_CLIENT_STATE_DESCRIBE_STR

#define SIGNALING_CLIENT_STATE_DESCRIBE_STR   "Describe Channel"

◆ SIGNALING_CLIENT_STATE_DISCONNECTED_STR

#define SIGNALING_CLIENT_STATE_DISCONNECTED_STR   "Disconnected"

◆ SIGNALING_CLIENT_STATE_GET_CREDENTIALS_STR

#define SIGNALING_CLIENT_STATE_GET_CREDENTIALS_STR   "Get Security Credentials"

◆ SIGNALING_CLIENT_STATE_GET_ENDPOINT_STR

#define SIGNALING_CLIENT_STATE_GET_ENDPOINT_STR   "Get Channel Endpoint"

◆ SIGNALING_CLIENT_STATE_GET_ICE_CONFIG_STR

#define SIGNALING_CLIENT_STATE_GET_ICE_CONFIG_STR   "Get ICE Server Configuration"

◆ SIGNALING_CLIENT_STATE_JOIN_SESSION_CONNECTED_STR

#define SIGNALING_CLIENT_STATE_JOIN_SESSION_CONNECTED_STR   "Join Session Connected"

◆ SIGNALING_CLIENT_STATE_JOIN_SESSION_STR

#define SIGNALING_CLIENT_STATE_JOIN_SESSION_STR   "Join Session"

◆ SIGNALING_CLIENT_STATE_JOIN_SESSION_WAITING_STR

#define SIGNALING_CLIENT_STATE_JOIN_SESSION_WAITING_STR   "Join Session Waiting"

◆ SIGNALING_CLIENT_STATE_NEW_STR

#define SIGNALING_CLIENT_STATE_NEW_STR   "New"

◆ SIGNALING_CLIENT_STATE_READY_STR

#define SIGNALING_CLIENT_STATE_READY_STR   "Ready"

◆ SIGNALING_CLIENT_STATE_UNKNOWN_STR

#define SIGNALING_CLIENT_STATE_UNKNOWN_STR   "Unknown"

◆ SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_COUNT

#define SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_COUNT   MIN_HASH_BUCKET_COUNT

◆ SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_LENGTH

#define SIGNALING_CLOCKSKEW_HASH_TABLE_BUCKET_LENGTH   2

Default signaling clockskew (endpoint --> clockskew) hash table bucket count/length

◆ SIGNALING_GET_CURRENT_TIME

#define SIGNALING_GET_CURRENT_TIME (   pClient)
Value:
? ((pClient)->signalingClientCallbacks.getCurrentTimeFn((pClient)->signalingClientCallbacks.customData)) \
: GETTIME())
#define IS_CURRENT_TIME_CALLBACK_SET(pClient)
Definition: Signaling.h:83

◆ SIGNALING_ICE_CONFIG_REFRESH_ERROR_MSG

#define SIGNALING_ICE_CONFIG_REFRESH_ERROR_MSG   "Failed refreshing ICE server configuration with status code 0x%08x."

◆ SIGNALING_MAX_ERROR_MESSAGE_LEN

#define SIGNALING_MAX_ERROR_MESSAGE_LEN   512

◆ SIGNALING_RECONNECT_ERROR_MSG

#define SIGNALING_RECONNECT_ERROR_MSG   "Failed to reconnect with status code 0x%08x."

◆ SIGNALING_REQUEST_ID_HEADER_NAME

#define SIGNALING_REQUEST_ID_HEADER_NAME   KVS_REQUEST_ID_HEADER_NAME ":"

◆ SIGNALING_STATE_MACHINE_NAME

#define SIGNALING_STATE_MACHINE_NAME   (PCHAR) "SIGNALING"

◆ SIGNALING_UPDATE_ERROR_COUNT

#define SIGNALING_UPDATE_ERROR_COUNT (   pClient,
  status 
)
Value:
if ((pClient) != NULL && STATUS_FAILED(status)) { \
ATOMIC_INCREMENT(&(pClient)->diagnostics.numberOfErrors); \
}

◆ TO_SIGNALING_CLIENT_HANDLE

#define TO_SIGNALING_CLIENT_HANDLE (   p)    ((SIGNALING_CLIENT_HANDLE) (p))

Typedef Documentation

◆ PLwsCallInfo

typedef struct __LwsCallInfo* PLwsCallInfo

◆ PSignalingClient

◆ PSignalingClientInfoInternal

◆ PSignalingDiagnostics

◆ PThreadTracker

typedef struct ThreadTracker * PThreadTracker

◆ SignalingApiCallHookFunc

typedef STATUS(* SignalingApiCallHookFunc) (UINT64)

Function Documentation

◆ awaitForThreadTermination()

STATUS awaitForThreadTermination ( PThreadTracker  pThreadTracker,
UINT64  timeout 
)
Here is the caller graph for this function:

◆ configureRetryStrategyForSignalingStateMachine()

STATUS configureRetryStrategyForSignalingStateMachine ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectSignalingChannel()

STATUS connectSignalingChannel ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createChannel()

STATUS createChannel ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createSignalingSync()

STATUS createSignalingSync ( PSignalingClientInfoInternal  pClientInfo,
PChannelInfo  pChannelInfo,
PSignalingClientCallbacks  pCallbacks,
PAwsCredentialProvider  pCredentialProvider,
PSignalingClient ppSignalingClient 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deleteChannel()

STATUS deleteChannel ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ describeChannel()

STATUS describeChannel ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ describeMediaStorageConf()

STATUS describeMediaStorageConf ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeClientRetryStrategy()

STATUS freeClientRetryStrategy ( PSignalingClient  pSignalingClient)
Here is the caller graph for this function:

◆ freeSignaling()

STATUS freeSignaling ( PSignalingClient ppSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChannelEndpoint()

STATUS getChannelEndpoint ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getIceConfig()

STATUS getIceConfig ( PSignalingClient  pSignalingClient,
UINT64  time 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initializeThreadTracker()

STATUS initializeThreadTracker ( PThreadTracker  pThreadTracker)
Here is the caller graph for this function:

◆ joinStorageSession()

STATUS joinStorageSession ( PSignalingClient  pSignalingClient,
UINT64  time 
)

< TBD

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refreshIceConfiguration()

STATUS refreshIceConfiguration ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setupDefaultRetryStrategyForSignalingStateMachine()

STATUS setupDefaultRetryStrategyForSignalingStateMachine ( PSignalingClient  pSignalingClient)
Here is the caller graph for this function:

◆ signalingConnectSync()

STATUS signalingConnectSync ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingDeleteSync()

STATUS signalingDeleteSync ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingDisconnectSync()

STATUS signalingDisconnectSync ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingFetchSync()

STATUS signalingFetchSync ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingGetCurrentTime()

UINT64 signalingGetCurrentTime ( UINT64  customData)
Here is the caller graph for this function:

◆ signalingGetIceConfigInfo()

STATUS signalingGetIceConfigInfo ( PSignalingClient  pSignalingClient,
UINT32  index,
PIceConfigInfo ppIceConfigInfo 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingGetIceConfigInfoCount()

STATUS signalingGetIceConfigInfoCount ( PSignalingClient  pSignalingClient,
PUINT32  pIceConfigCount 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingGetMetrics()

STATUS signalingGetMetrics ( PSignalingClient  pSignalingClient,
PSignalingClientMetrics  pSignalingClientMetrics 
)
Here is the caller graph for this function:

◆ signalingGetOngoingMessage()

STATUS signalingGetOngoingMessage ( PSignalingClient  pSignalingClient,
PCHAR  correlationId,
PCHAR  peerClientId,
PSignalingMessage ppSignalingMessage 
)
Here is the caller graph for this function:

◆ signalingRemoveOngoingMessage()

STATUS signalingRemoveOngoingMessage ( PSignalingClient  pSignalingClient,
PCHAR  correlationId 
)
Here is the caller graph for this function:

◆ signalingSendMessageSync()

STATUS signalingSendMessageSync ( PSignalingClient  pSignalingClient,
PSignalingMessage  pSignalingMessage 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ signalingStoreOngoingMessage()

STATUS signalingStoreOngoingMessage ( PSignalingClient  pSignalingClient,
PSignalingMessage  pSignalingMessage 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ terminateOngoingOperations()

STATUS terminateOngoingOperations ( PSignalingClient  pSignalingClient)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ uninitializeThreadTracker()

STATUS uninitializeThreadTracker ( PThreadTracker  pThreadTracker)
Here is the caller graph for this function:

◆ validateIceConfiguration()

STATUS validateIceConfiguration ( PSignalingClient  pSignalingClient)
Here is the caller graph for this function:

◆ validateSignalingCallbacks()

STATUS validateSignalingCallbacks ( PSignalingClient  pSignalingClient,
PSignalingClientCallbacks  pCallbacks 
)
Here is the caller graph for this function:

◆ validateSignalingClientInfo()

STATUS validateSignalingClientInfo ( PSignalingClient  pSignalingClient,
PSignalingClientInfoInternal  pClientInfo 
)
Here is the caller graph for this function: