Amazon Kinesis Webrtc C SDK
ConnectionListener.h
Go to the documentation of this file.
1 /*******************************************
2 Connection Listener internal include file
3 *******************************************/
4 #ifndef __KINESIS_VIDEO_WEBRTC_CONNECTION_LISTENER__
5 #define __KINESIS_VIDEO_WEBRTC_CONNECTION_LISTENER__
6 
7 #pragma once
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 #define CONNECTION_LISTENER_SOCKET_WAIT_FOR_DATA_TIMEOUT (200 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
14 #define CONNECTION_LISTENER_SHUTDOWN_TIMEOUT (1000 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND)
15 #define CONNECTION_LISTENER_DEFAULT_MAX_LISTENING_CONNECTION 64
16 #define CONNECTION_LISTENER_KICK_SOCKET_LISTEN 0
17 #define CONNECTION_LISTENER_KICK_SOCKET_WRITE 1
18 
19 typedef struct {
20  volatile ATOMIC_BOOL terminate;
22  UINT64 socketCount;
23  MUTEX lock;
25  PBYTE pBuffer;
26  UINT64 bufferLen;
27 #ifndef _WIN32
28  INT32 kickSocket[2];
29 #endif
31 
40 
49 
59 
69 
78 
88 
90 // internal functionalities
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 #endif /* __KINESIS_VIDEO_WEBRTC_CONNECTION_LISTENER__ */
struct ConnectionListener * PConnectionListener
STATUS connectionListenerRemoveAllConnection(PConnectionListener)
Definition: ConnectionListener.c:176
STATUS createConnectionListener(PConnectionListener *)
Definition: ConnectionListener.c:7
STATUS connectionListenerRemoveConnection(PConnectionListener, PSocketConnection)
Definition: ConnectionListener.c:141
#define CONNECTION_LISTENER_DEFAULT_MAX_LISTENING_CONNECTION
Definition: ConnectionListener.h:15
PVOID connectionListenerReceiveDataRoutine(PVOID arg)
Definition: ConnectionListener.c:239
STATUS freeConnectionListener(PConnectionListener *)
Definition: ConnectionListener.c:50
STATUS connectionListenerStart(PConnectionListener)
Definition: ConnectionListener.c:205
STATUS connectionListenerAddConnection(PConnectionListener, PSocketConnection)
Definition: ConnectionListener.c:105
Definition: ConnectionListener.h:19
MUTEX lock
Definition: ConnectionListener.h:23
volatile ATOMIC_BOOL terminate
Definition: ConnectionListener.h:20
PBYTE pBuffer
Definition: ConnectionListener.h:25
UINT64 socketCount
Definition: ConnectionListener.h:22
UINT64 bufferLen
Definition: ConnectionListener.h:26
TID receiveDataRoutine
Definition: ConnectionListener.h:24
Definition: SocketConnection.h:25