my knowledge my knowledge

Poco TCPServer class


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


Handler is quite similar:


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


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


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.


The presented code can be downloaded as an archive.


 

 

ay ay a ya ya

What Every Dev Must Know About Multithreaded Apps

Ten years ago only hard-core systems programmers worried about the intricacies of writing correct code in the presence of more than one thread of execution. Most programmers stuck with sequential programs to avoid the problem altogether.


Read more

The Boost.Threads Library

Standard C++ threads are imminent and will derive from the Boost.Threads library, explored here by the library's author.


Read more

volatile vs. volatile

What does the volatile keyword mean? How should you use it? Confusingly, there are two common answers, because depending on the language you use volatile supports one or the other of two different programming techniques: lock-free programming, and dealing with 'unusual' memory.


Read more