This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Server.cpp | |
* | |
* EventServer is a simple C++ TCP socket server implementation, | |
* to serve as an example to anyone who wants to learn it. | |
* It can interface with the rest of your program using three callback functions. | |
* - onConnect, which fires when a new client connects. the client's fd is passed. | |
* - onDisconnect, which fires when a client disconnects. passes fd. | |
* - onInput, fires when input is received from a client. passes fd and char* | |
* |