PDA

View Full Version : C/++ Networking and Sockets



KaeseEs
November 7th, 2006, 01:18 AM
Hey all,

I'm looking at writing a program that wakes a remote machine over the internet, via the wake-on-lan protocol, but over a WAN. Putting together the magic packet is rather simple, but I'm terribly inexperienced with network code, so I'm looking for a good guide to network and socket programming in C or C++ (I'm decent with both). If you could post a link to such a guide/tutorial/reference, it would be greatly appreciated.

localuser
November 7th, 2006, 03:43 AM
See if these help...

They should at least get you started. The first is the one to go through carefully, the others are some extras I've read in the past.

http://beej.us/guide/bgnet/output/html/index.html

http://cs.ecs.baylor.edu/~donahoo/practical/CSockets/practical/
http://sage.mc.yu.edu/kbeen/teaching/networking/resources/sockets.html
http://users.actcom.co.il/~choo/lupg/tutorials/

If you are seriously going to get into network programming, though, a good text will be invaluable. Here's a very good one that I would recommend...

http://www.amazon.com/Unix-Network-Programming-Vol-Networking/dp/0131411551/sr=8-1/qid=1162867340/ref=pd_bbs_sr_1/103-1592730-1110269?ie=UTF8&s=books

KaeseEs
November 8th, 2006, 11:37 PM
Thanks for the linkage, localuser ! I got hit with an unrelated project yesterday, but I'll be sure to post on the forums when I get some working code.

THaugland
November 9th, 2006, 01:52 PM
You can also find a great guide here: http://beej.us/guide/bgnet/

I second "localuser"s recommandation of "Unix Network Programming, Vol. 1: The Sockets Networking API".