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

C++ Rvalue References

Explained Rvalue references are a feature of C++ that was added with the C++11 standard. What makes rvalue references a bit difficult to grasp is that when you first look at them, it is not clear what their purpose is or what problems they solve.


Read more

A Portable "typeof" Operator

Here's a not-so-stupid template trick that mostly meets the need for a typeof operator.


Read more

Move semantics and rvalue references in C++11

C++ has always produced fast programs. Unfortunately, until C++11, there has been an obstinate wart that slows down many C++ programs: the creation of temporary objects. Sometimes these temporary objects can be optimized away by the compiler (the return value optimization, for example).


Read more