It's been a long time since my last tutorial, but finally I've started again! This time it's about networking, as many people getting started with winsock have problems with it.

A few notes:


    [*]Unlike previous tutorials, this one will be released as I write the chapters, one chapter at a time, to keep you unpatient people happy :)
    [*]The tutorial will not only discuss the winsock API but also basics of networking and networking techniques. This because many people don't find the winsock functions hard to use, but use them incorrectly or don't know enough about networks to come up with the right algorithm. Right now the first chapter is the only one that's finished, it tells you about ethernet LANs (TCP, IP, etc). Some may want to start programming immediately but I can tell you that the first chapters will not contain much code as it's just as important to learn networking basics first.
    [*]When the tutor gets to the code (not right now), you can choose which programming language you want to view the examples in. The choice will be win32asm (of course), and C. This way, C programmers will benefit from the tutorial as well, and even for win32asm programmers it might be useful to see the algorithms in a higher level language first to get the idea.
    [*]If you see any mistakes in the tutorial, PM/mail me and I'll fix it.


    The url: here it is.

    have fun!

    Thomas
Posted on 2002-08-26 13:12:48 by Thomas
it would be a good starting point into network programming ... thanks
Posted on 2002-08-26 17:21:43 by code1101
Afternoon, Thomas.

very nice start. Thanks.

Couple of questions:
How often do you hope to add the next chapter?
During the tuts, would you be able to notify when something is different between TCP and UDP?

You've mentioned that the tuts won't cover UDP, however it'd be nice to know what to look out for.

Until the next chapter.

Cheers,
Scronty
Posted on 2002-08-26 17:56:02 by Scronty
Great stuff, it's a topic well worth covering.
My only suggestion is that the first chapter appears very abstract and dry,
like many of the tutorials based on RFC's out there.
Newbs find the dry approach a bit of a turn-off, and I guess it's them that
this kind of tutorial is squarely aimed at (and they stand to gain the most too).
Try to throw some humor in there someplace to keep them reading.
Kudos for taking the time to write tutes, good work.
Posted on 2002-08-28 01:05:28 by Homer

How often do you hope to add the next chapter?


I hope I can make a new chapter every 2 or 3 weeks or so, but it depends on my own time and the amount of example code in the chapters.


During the tuts, would you be able to notify when something is different between TCP and UDP?
You've mentioned that the tuts won't cover UDP, however it'd be nice to know what to look out for.


I'll do that.


Great stuff, it's a topic well worth covering.
My only suggestion is that the first chapter appears very abstract and dry,
like many of the tutorials based on RFC's out there.
Newbs find the dry approach a bit of a turn-off, and I guess it's them that
this kind of tutorial is squarely aimed at (and they stand to gain the most too).
Try to throw some humor in there someplace to keep them reading.
Kudos for taking the time to write tutes, good work.


I'll try... The topics covered by the first tutorials are quite dry (just theory, no code), but important. The tutorial will be more fun when the coding starts :)

Thomas
Posted on 2002-08-28 07:55:50 by Thomas
Thomas, I do not think that the first chapter is that dry. I have seen drier stuffs from other networking books, so I think your tutorial is kinda okay.
Posted on 2002-08-28 11:19:07 by roticv
I added chapter 2 to the tutorial, not a very big one though. The next chapter(s) will introduce winsock and the basic winsock functions so they will be bigger.

I can also make a PDF version for printing (not for reading it in acrobat reader, because the graphics will be designed for printing and look worse on a monitor than with the online version), if there's enough interest?

A chm version will be made as well when the tutor is finished, unless someone is dying to have an htmlhelp version earlier :).

Thomas
Posted on 2002-09-01 10:33:46 by Thomas
A chm version will be made as well when the tutor is finished, unless someone is dying to have an htmlhelp version earlier .

:grin: :grin: :grin:

I hope I answered your question .... ;)
Posted on 2002-09-01 16:10:26 by code1101


:grin: :grin: :grin:

I hope I answered your question .... ;)


:) I added the chm version now.

Thomas
Posted on 2002-09-02 13:01:22 by Thomas
very nice work ... thanks alot Thomas ...:)
Posted on 2002-09-02 16:05:31 by code1101
It has been quite a while since the last update but finally chapter 3 is finished. It's an introduction to sockets and winsock.

Thomas
Posted on 2002-11-02 05:01:20 by Thomas
I downloaded my copy ..... :)
I'll tell you what I think tommorow ... I have alot of work ...
btw I took a look at it and it seems that this series of tutorials gona be very great ... I've never yet seen a networking tutorials that are very intuitive .... most of them are very boring and dry ...
good work ...
Posted on 2002-11-02 06:32:52 by code1101
It's getting better and better for each chapter.
If you complete the tutorial series,
I think it actually it'll have chances of being (and I have 'googled' a lot on winsock while trying to get info without buying an expensive book) one of the best, if not THE best introduction to Winsock on the web.

It's to the point, clean, good layout, and those images you designed really helps, making the message come across.

:alright:
Posted on 2002-11-03 19:26:34 by david
Thanks code1101 and david, I'm trying hard to keep the tutorials easy to read but complete at the same time. Next chapter will be the basic winsock functions, both the asm version and the C(++) version. I'm still in doubt whether I should make the C version really C (with some bits of C++, but not real OO), or C++ (and go for the object oriented approach).
If I would go for just C it will be the same as the asm version, just a different syntax. C++ would give the examples a different design, probably a bit cleaner...

Thomas
Posted on 2002-11-05 16:24:01 by Thomas
Thomas, nice tutorial.

I don't think you should mix OOP concepts in, though. Aside from narrowing your audience, most Socket classes are notoriously cumbersome to work with and you might end up confusing those that don't have experience with OOP. I think it's best to stick with the basic principles and let the reader implement their own class wrapper if they see fit. If you do touch on any issues that would require any object oriented concepts, you can simply use linked data structures and whatnot.

Just a suggestion. Again, nice job. :alright:
Posted on 2002-11-05 16:42:49 by iblis
iblis: I don't think you should mix OOP concepts in, though. Aside from narrowing your audience, most Socket classes are notoriously cumbersome to work with and you might end up confusing those that don't have experience with OOP. I think it's best to stick with the basic principles and let the reader implement their own class wrapper if they see fit. If you do touch on any issues that would require any object oriented concepts, you can simply use linked data structures and whatnot.

I wasn't thinking about using OOP to create a socket wrapper, but for thinks like protocol handling. Finite state machines for example can be very useful for the proper implementation of a protocol.. Since those data structures contain a lot of close related data it would be nice to put it in a class. Of course I can use structures in C but it would be more or less the same then. Also thinks like a HTTP request would also fit nicely into it's own class. So actually the choice beteen C or C++ mostly affects the data structures used, not the socket programming itself.

Thomas
Posted on 2002-11-05 17:19:47 by Thomas
Ah, I hadn't taken that into consideration. I just figured your next tutorial was going to cover the bare basics of sockets, not protocols.
Posted on 2002-11-05 17:41:23 by iblis
:alright: The new site design is also great.
Posted on 2002-11-07 21:45:06 by Kydwyn
I don't think going with OOP will bring much confusion ... infact it might make the tuts more helpfull for a wider range of audiance ... and as you said, making it pure C might not make any difference since it'll only be syntax differences ...

PS: I'm sure you are keeping this in mind but it doesn't hurt to mention it ... keep your work going at the same base .... it is very very good and as david mention
I think it actually it'll have chances of being (and I have 'googled' a lot on winsock while trying to get info without buying an expensive book) one of the best, if not THE best introduction to Winsock on the web.

don't overwork on it and it'll stay as great as it is ... I hate to see it go down the hill and become one of the other regular bloated winsock tuts out there ...

thanks again for the tuts ...

code1101
Posted on 2002-11-08 18:45:33 by code1101
Chapter 3. 5
Isn't connecton socket that returned after accept() on the server is bound to the different( random, like from connect() ) port , so a listening socket can continue use listening port without interference?
Posted on 2002-11-15 12:58:56 by Sergo