|
My Project
|
Header for the connection-handling module. More...
Go to the source code of this file.
Functions | |
| int | initConnectionHandler (void) |
| Initializes the connection-handling module. More... | |
| void | handleConnection (int clientSock, int listenSock) |
| Handles an incoming connection. More... | |
Header for the connection-handling module.
| void 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. If the implementation launches a child process to handle the connection, this socket must be closed in that child process. |
| int initConnectionHandler | ( | void | ) |
Initializes the connection-handling module.