
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 |
Typedefs | |
| typedef struct ConnectionListener * | PConnectionListener |
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) |
| #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_SHUTDOWN_TIMEOUT (1000 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND) |
| #define CONNECTION_LISTENER_SOCKET_WAIT_FOR_DATA_TIMEOUT (200 * HUNDREDS_OF_NANOS_IN_A_MILLISECOND) |
| typedef struct ConnectionListener * PConnectionListener |
| STATUS connectionListenerAddConnection | ( | PConnectionListener | pConnectionListener, |
| PSocketConnection | pSocketConnection ) |
add a new PSocketConnection to listen for incoming data
| - | PConnectionListener - IN - the ConnectionListener struct to use |
| - | PSocketConnection - IN - new PSocketConnection to listen for incoming data |

| PVOID connectionListenerReceiveDataRoutine | ( | PVOID | arg | ) |


| STATUS connectionListenerRemoveAllConnection | ( | PConnectionListener | pConnectionListener | ) |
remove all listening PSocketConnection
| - | PConnectionListener - IN - the ConnectionListener struct to use |


| STATUS connectionListenerRemoveConnection | ( | PConnectionListener | pConnectionListener, |
| PSocketConnection | pSocketConnection ) |
remove PSocketConnection from the list to listen for incoming data
| - | PConnectionListener - IN - the ConnectionListener struct to use |
| - | PSocketConnection - IN - PSocketConnection to be removed |


| 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.
| - | PConnectionListener - IN - the ConnectionListener struct to use |


| STATUS createConnectionListener | ( | PConnectionListener * | ppConnectionListener | ) |
allocate the ConnectionListener struct
| - | PConnectionListener* - IN/OUT - pointer to PConnectionListener being allocated |


| STATUS freeConnectionListener | ( | PConnectionListener * | ppConnectionListener | ) |
free the ConnectionListener struct and all its resources
| - | PConnectionListener* - IN/OUT - pointer to PConnectionListener being freed |

