Header for the connection-handling module. More...
Go to the source code of this file.
Functions | |
| int | initConnectionHandler (void) |
| Initializes the connection-handling module. | |
| int | handleConnection (int clientSock, int listenSock) |
| Handles an incoming connection. | |
Header for the connection-handling module.
| int handleConnection | ( | int | clientSock, | |
| int | listenSock | |||
| ) |
Handles an incoming connection.
This function should be called from the main module whenever a new connection has been accepted.
| clientSock | Socket representing the accepted connection from the client. Upon completing the request or as soon as it is no longer needed, this socket is closed. | |
| listenSock | Socket the server is listening on. This socket must be closed in any child process that may be launched. |
| int initConnectionHandler | ( | void | ) |
Initializes the connection-handling module.
1.7.1