Winsock2 Help

Started by
5 comments, last by nevernomore 18 years, 9 months ago
Alright, I'm sure everyone is going to cringe at this, but I've read over a couple tutorials on Winsock programming on windows and I'm still lost. I read the tutorial I found on this site by searching, it helped a tad, but trying to compile in .NET proved difficult as the datatypes for functions are different than what the tutorial says and such. Basically my question is, is there any clean tutorials that can just tell me the basics in a nice easy fashion? The ones I've seen so far jump right into you constructing a game/app which doesn't help much further. Error checking is good, but it clutters up all the code behind the scenes at first when learning the basics. Maybe it's easy enough for someone just to write out the simple steps of create these objects, here's how to assign port/IP/Protocol type and here's how to send/recieve data from server/client? I understand all the networking basics of the client/server and client/client models as well as the transport protocols and IP networking, as I hold my CCNA, but the C++ side of things are rocky. Wish it was as easy as VB made it. Thanks guys!
-Conrad
Advertisement
Personally, I would head on over to MSDN: Windows Sockets 2 and first read through "Using Winsock" and then get the details in the reference section. I remember trying to find my way through winsock with various tutorials out there, and it got me close to nowhere.


jfl.
I know exactly how you feel, it's hard as hell to find any good info on this, but I just followed the MSDN guide to winsock and it's great! I can't believe I'm actually using MSDN to learn about APIs for once. :) I guess MS isn't so bad after all. ;)


Thanks!
-Conrad
Glad to be of help.

MSDN is actualy an invaluable resource, once you get used to the format.


jfl.
I highly recommend Network Programming for Microsoft Windows, Second Edition
by Anthony Jones and Jim Ohmund.

Check out website:

http://www.tangentsoft.net/wskfaq/

Check out my website for software development links.

http://www.dslextreme.com/users/kuphryn/links.html

Kuphryn
As far as I recall, that book doesn't talk about .NET sockets at all. The poster explicitly said that his problem was that the tutorials were missing .NET information.

I second the suggestion to learn to use MSDN. It's the truth (or as close as you'll get) straight from the horse's mouth, and it documents EVERYTHING. The only trick is to learn to ignore the hits related to Windows CE, or Visual Basic for Applications, or Visual FoxPro, ... and go straight to the section that you actually want (which is typically psdk, dllbase or winui for C++ types, or the .NET stuff for managed people).
enum Bool { True, False, FileNotFound };
try this one for .net network programming.


http://www.microsoft.com/mspress/books/6446.asp

Network Programming for the Microsoft® .NET Framework
Author Anthony Jones, Jim Ohlund, Lance Olson
Pages 384
Disk N/A
Level Int/Adv
Published 09/17/2003
ISBN 0-7356-1959-X

This topic is closed to new replies.

Advertisement