This is a really contrived example and I've never found it useful as the base for a REAL server but it's useful for showing some server design issues. So, I don't recommend that you use this kind of server as a base for a REAL server, but just as something to learn from. Note that it COULD be a good idea to use a thread pool with a packet based protocol server, it's just that it's unlikely that you'd ever want to have a different size of data buffer for I/O and protocol data accumulation.
This example shows you how to build a server which works with a simple length prefixed block protocol and does its work in a business logic thread pool. As such it's very similar in structure to both the Packet Echo Server
and Thread Pool Simple Protocol Server
examples and you should go and read about those first and have a good understanding of how everything fits together. This document will only cover the differences between those example and this one.
This example is shipped with all licensed versions of The Server Framework and it requires the core server framework libraries (see here
for licensing options). You can always download the latest version of this example from here
; and although you will need the correct libraries to be able to build it you can look at the example code and see how it works and perhaps get ideas from it. A compiled, unicode release, build of this example is available on request if you require it for performance analysis of the framework.
This example tries too hard and demonstrates too much. See here
for the original article that spawned this server.
Yes, that's it :)