Page 1 of 1

PB Networking Code Example

Posted: Sat Jul 05, 2003 3:13 am
by Karbon
Hey guys, I'd appreciate any comments on some networking code. I did it mostly as an exercise but I have to do something like this for a project coming up and wanted to get the hang of it. Also wanted to provide it as a tutorial for other users..

Included is a small server and client, let me know what you think!

Download Zip

Thanks!

Posted: Sun Jul 06, 2003 6:26 pm
by Karbon
30+ people have downloaded it - any comments?

Just a "hey it works on my Windows XXXX machine" would be great!

Thanks!

Posted: Sun Jul 06, 2003 10:45 pm
by Henrik
Hi Karbon
Great code :D
Sorry i didnt responde sooner but i have very littel time right now. :(

Your code is working just fine, Running win 98 se :D

I like your programming style, makes it verry easy to read even without your very well documented remarkes, this of course makes it easyer to understand, even if you are new to networking.

So overall, i think that your code is good basis to build on.

The only thing i would object to, is to use Callback for too much code, like keeping the callback as clean as possible.

Like.

Code: Select all

If Message = #NETWORK_EVENT
     NetworkProcedure()
ElseIF   Message =#WM_SIZE
     ResizeProcedure()
ElseIF   Message = #Bla.Bla
     BlaProcedure()
EndIF ; End Message 
Or something like that, but thats how i like stuff 8)

Best regards
Henrik.

Posted: Sun Jul 06, 2003 10:58 pm
by Karbon
Right-o about the callback, I will mod the comment to say something about that..

Thanks for the nice words! Glad you like it!

Posted: Mon Jul 07, 2003 1:21 am
by woki
Hi,

works with XP prof. SP1 local (127.0.0.1) and over the network (server on XP prof.SP1 - client on Windows ME)

Can't seem to....

Posted: Tue Jul 08, 2003 5:45 am
by LJ
Can't get the client side to connect to network. I'm using a linksys box and no "base" system network configuration, peer to peer. Both computers on my network communicate to the linksys box with an IP address, a subnet mask, and then an SSID.

Posted: Tue Jul 08, 2003 3:08 pm
by Karbon
Hmm, I'm not sure what the problem might be..I'll have to look into what OpenNetworkConnection() requires..

OK

Posted: Wed Jul 09, 2003 5:31 am
by LJ
Ok, sounds great. Let me know what you find out. I'll test any code you write. Networking is a universe onto itself, I know you understand what I mean by this. A tutorial on networking would be awesome if you find out enough information. Keep me posted.

Posted: Wed Jul 09, 2003 10:24 am
by Tranquil
Its C++ related but it helped me very much due to learning networking:


http://www.codeproject.com/internet/?Display=title

Greetz
Mike