To use this thing:
void handler(Socket s) { do something... } auto manager = new ListeningConnectionManager("127.0.0.1", 80, &handler, &delegateThatDropsPrivileges); manager.listen();
The 4th parameter is optional.
I suggest you use BufferedInputRange(connection) to handle the input. As a packet comes in, you will get control. You can just continue; though to fetch more.
FIXME: should I offer an event based async thing like netman did too? Yeah, probably.
See Implementation
To use this thing:
The 4th parameter is optional.
I suggest you use BufferedInputRange(connection) to handle the input. As a packet comes in, you will get control. You can just continue; though to fetch more.