A little help with WinSocks?

One of my students decided he wants to build a multiplayer networked game, and is writing it in VB.NET (2003). He’s been hunting down WinSock programming examples (and understanding very little of them) for a few days now, and (finally) turned to me for help.

Here’s the catch: I did some networked games a few years ago in VB6, but never managed to get the hang of it in VB.NET. I mean, it was blessedly easy back then: You plot the WinSock object on the form, and most of your work is done. I’ve periodically hunted for an equivalently simple example in .NET for a couple years, but never found one. (I even found something today in MSDN, but haven’t taken the time to translate it into English yet. 8^)

So then … are there any experts out there who know what I’m talking about, and can provide a quick tutorial or simple example of a socket based networked program? Even a generic "chat" program would get the basics across. (After all, a networked game is nothing more than a chat program that passes game status back and forth without actually telling the user what’s happening.)

Thanks in advance.

 

COMMENTS FROM theSpoke:

re: A little help with WinSocks? @ Thursday, September 15, 2005 9:20 AM

In the .net SDK, or at least the version that comes with Visual Studio, there’s a sample application WinTalk that demonstrated how to use the System.Net.Sockets namespace.

TerryDenham

re: A little help with WinSocks? @ Monday, September 19, 2005 10:51 PM

Thanks, I will look into it. (I figured there had to be something like this.)

Anyone know of an equivalent in VB.NET?

Mr_I

re: A little help with WinSocks? @ Tuesday, September 20, 2005 1:11 PM

I haven’t looked at it yet but the videos at http://www.franklins.net/video/sockets/ may be useful.

AlfredTwo

re: A little help with WinSocks? @ Wednesday, September 21, 2005 3:37 PM

Interesting. Took three tries of running the video on one computer whilst I typed at another, but I think the program works. Now, if only Carl actually explained in detail what the code did and why it works …

(I know, I’m asking a lot for nothing, ain’t I?)

Mr_I

 

Advertisements

About Mr. I

After 17 years as a PC Software Engineer I gave it all up in 2000 to become a High School Computer Teacher
This entry was posted in IntoSpaces. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s