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

Go to the source code of this file.

Classes

struct  ConnectionListener
 

Macros

#define CONNECTION_LISTENER_SOCKET_WAIT_FOR_DATA_TIMEOUT   (200 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
 
#define CONNECTION_LISTENER_SHUTDOWN_TIMEOUT   (1000 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
 
#define CONNECTION_LISTENER_DEFAULT_MAX_LISTENING_CONNECTION   64
 
#define CONNECTION_LISTENER_KICK_SOCKET_LISTEN   0
 
#define CONNECTION_LISTENER_KICK_SOCKET_WRITE   1
 
#define CONNECTION_LISTENER_STACK_SIZE_BYTES   128 * 1024
 

Typedefs

typedef struct ConnectionListenerPConnectionListener
 

Functions

STATUS createConnectionListener (PConnectionListener *)
 
STATUS freeConnectionListener (PConnectionListener *)
 
STATUS connectionListenerAddConnection (PConnectionListener, PSocketConnection)
 
STATUS connectionListenerRemoveConnection (PConnectionListener, PSocketConnection)
 
STATUS connectionListenerRemoveAllConnection (PConnectionListener)
 
STATUS connectionListenerStart (PConnectionListener)
 
PVOID connectionListenerReceiveDataRoutine (PVOID arg)
 

Macro Definition Documentation

◆ CONNECTION_LISTENER_DEFAULT_MAX_LISTENING_CONNECTION

#define CONNECTION_LISTENER_DEFAULT_MAX_LISTENING_CONNECTION   64

◆ CONNECTION_LISTENER_KICK_SOCKET_LISTEN

#define CONNECTION_LISTENER_KICK_SOCKET_LISTEN   0

◆ CONNECTION_LISTENER_KICK_SOCKET_WRITE

#define CONNECTION_LISTENER_KICK_SOCKET_WRITE   1

◆ CONNECTION_LISTENER_SHUTDOWN_TIMEOUT

#define CONNECTION_LISTENER_SHUTDOWN_TIMEOUT   (1000 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

◆ CONNECTION_LISTENER_SOCKET_WAIT_FOR_DATA_TIMEOUT

#define CONNECTION_LISTENER_SOCKET_WAIT_FOR_DATA_TIMEOUT   (200 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)

◆ CONNECTION_LISTENER_STACK_SIZE_BYTES

#define CONNECTION_LISTENER_STACK_SIZE_BYTES   128 * 1024

Typedef Documentation

◆ PConnectionListener

Function Documentation

◆ connectionListenerAddConnection()

STATUS connectionListenerAddConnection ( PConnectionListener  pConnectionListener,
PSocketConnection  pSocketConnection 
)

add a new PSocketConnection to listen for incoming data

Parameters
-PConnectionListener - IN - the ConnectionListener struct to use
-PSocketConnection - IN - new PSocketConnection to listen for incoming data
Returns
- STATUS status of execution
Here is the caller graph for this function:

◆ connectionListenerReceiveDataRoutine()

PVOID connectionListenerReceiveDataRoutine ( PVOID  arg)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectionListenerRemoveAllConnection()

STATUS connectionListenerRemoveAllConnection ( PConnectionListener  pConnectionListener)

remove all listening PSocketConnection

Parameters
-PConnectionListener - IN - the ConnectionListener struct to use
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectionListenerRemoveConnection()

STATUS connectionListenerRemoveConnection ( PConnectionListener  pConnectionListener,
PSocketConnection  pSocketConnection 
)

remove PSocketConnection from the list to listen for incoming data

Parameters
-PConnectionListener - IN - the ConnectionListener struct to use
-PSocketConnection - IN - PSocketConnection to be removed
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ connectionListenerStart()

STATUS connectionListenerStart ( PConnectionListener  pConnectionListener)

Spin off a listener thread that listen for incoming traffic for all PSocketConnection stored in connectionList. Whenever a PSocketConnection receives data, invoke ConnectionDataAvailableFunc passed in.

Parameters
-PConnectionListener - IN - the ConnectionListener struct to use
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ createConnectionListener()

STATUS createConnectionListener ( PConnectionListener ppConnectionListener)

allocate the ConnectionListener struct

Parameters
-PConnectionListener* - IN/OUT - pointer to PConnectionListener being allocated
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeConnectionListener()

STATUS freeConnectionListener ( PConnectionListener ppConnectionListener)

free the ConnectionListener struct and all its resources

Parameters
-PConnectionListener* - IN/OUT - pointer to PConnectionListener being freed
Returns
- STATUS status of execution
Here is the call graph for this function:
Here is the caller graph for this function: