Poco TCPServer class

POCO library implements class TCPServer which dispatches connections as described here. Most of the classes for these examples are common:

Session.hpp
Session.cpp
ChatLine.hpp
ChatLine.cpp
Message.hpp
Message.cpp

Handler is quite similar:

Handler.hpp
Handler.cpp

To imlement a server connection, one needs to derive from the TCPServerConnection:

ServerConnection.hpp
ServerConnection.cpp

To start the server an instance of TCPServer is created using the binded server socket:

main.cpp

Server is tested under Linux 2.6.37 64bit/gcc 4.5.2/Poco 1.4.2p1, FreeBSD 8.0 64bit/gcc 4.2.1/Poco 1.4.2p1, Windows 7/VS 2010/Poco 1.4.2p1, compiled as specified in the Makefile.

Makefile

The presented code can be downloaded as an archive.

ready.

10 print "mail: contact at alepho.com | skype: karastojko | gtalk: karastojko at gmail.com | icq: 367100012 | yahoo: karastojko at yahoo.com"
20 print "(c) 2009-2015 www.alepho.com"