Library tutorials & articles
A reusable Windows socket server class
Overview
Writing a high performance server that runs on Windows NT and uses sockets to communicate with the outside world isn't that hard once you dig through the API references. What's more most of the code is common between all of the servers that you're likely to want to write. It should be possible to wrap all of the common code up in some easy to reuse classes. However, when I went looking for some classes to use to write my first socket server all of the examples and articles that I found required the user to pretty much start from scratch or utilise "cut and paste reuse" when they wanted to use the code in their own servers. Also the more complicated examples, ones that used io completion ports for example, tended to stop short of demonstrating real world usage. After all, anyone can write an echo server...
The aim of this article is to explain the set of reusable classes that I designed for writing socket servers and show how they can be used with servers which do more than simply echo every byte they receive. Note that I'm not going to bother explaining the hows and why's of IO completion ports etc, there are plenty of references available.
Related articles
Related discussion
-
WinGDB - Linux debugging under Visual Studio
by WinGDB (0 replies)
-
Java - Closing inputstream causes socket to close
by gftChris (0 replies)
-
How to POP3 in C#
by bishnu.tewary (7 replies)
-
Programmers in Trinidad and Tobago
by alacom (1 replies)
-
Can somebody help: CAsyncSOcket class (Client-server networking)
by chong (7 replies)
Related podcasts
-
Listener Feedback 67
This mailbag episode includes FASM, scripts, sockets, SSL/TLS, HTTPS, Windows 7's XP mode, and more. Security Now wiki shownotes For 16kpbs versions, transcripts, and notes (including fixes), visit Steve's site: grc.com, also the home of the best disk maintenance and recovery utility ever written...
This thread is for discussions of A reusable Windows socket server class.