The Windows Socket
Programming Tutorial
winsock
Contents

Home
Part 1
Part 2
RFC's
Welcome to the Windows socket programming tutorial. Here you'll find out how to program your own internet applications. The guide assumes no prior knowledge of programming with Windows Sockets, although you need a working knowledge of C. The tutorial starts off very simple and will eventually build up to an advanced level so you can understand how to program your own code for hacking applications.

Please feel free to report any bugs, typos etc. There was one that crept into the pop client in part two of the tutorial, but this has been fixed (cheers Bone Digger).

There's also the potential for a buffer overflow in the program (cheers mnemonix). I haven't bothered to fix that as there are lots of areas in all the programs which need better error trapping (virtually non-existent on purpose to keep the code easier to follow and understand). I will be putting a fully debugged and error trapped program example in the final part of the tutorial to show how to develop all of the frameworks illustrated into robust code. As this is going to be a custom firewall, it will need it ;)

I've had quite a few requests for C tutorials since I started this guide. There are plenty of beginners tutorials out on the web. I've downloaded and reviewed quite a few rather than write my own. If you haven't used C before, I would recommend the following guide :-

Coronado Enterprises C Tutor version 2

This is an excellent beginners guide and covers virtually everything you will need to know to understand the socket programming tutorial. It's also freeware. I've included it on the menu under downloads. File size is 192kB. I did not write the C tutorial, but if you have any questions about it, I'd be more than happy to answer them as I'm recommending it.

If you don't have a C compiler for windows, you can download the Windows port of the Linux GCC compiler package. You will also need the RSXNTDJ package to allow you to program apps for Windows. Both of these packages (along with many other useful tools) are freely available from http://www.delorie.com

Part One of the Socket tutorial describes in more detail what you will need and how to set up the compiler.

The Rota

BlueCrab Ltd