Click to See Complete Forum and Search --> : Network programming with C++
Xprotocol
02-06-2003, 09:45 PM
I'm looking into writing a very simple program with C++ to do basic network communication. Just something simple like talking back and forth between computers. I've looked all over the web but have found nothing. I grabbed a source at www.planetsourcecode.com but I'm missing some of the header files (which I cannot for the life of me find online either). So I was hoping that someone may be able to point me in the right dirrection of a good tutorial or a good book that explains what I want to learn. I already have a basic understanding of the C++ language so I'm not looking for anyone to spoon feed me here :p. Also, this will be done in Windows :eek:. Yea yea I know, I come here though because I know the advice is reliable. Thanx in advance.
bwkaz
02-06-2003, 11:12 PM
WinSock would probably be your best bet. Well... maybe.
Why don't I put it this way. WinSock will definitely allow you to do what you want. It's just a question of finding reference docs on it, and figuring out how it actually works.
majidpics
02-07-2003, 07:15 AM
Listen if you are looking socket programming in Windows obviously using winsock then the best reference for you is the MSDN library. And if you ever go thirough the socket programming in UNIX, then it will be no problem for you to switch into winsock.
Stuka
02-07-2003, 01:32 PM
Ok...first, go to Google, and get beej's network programming guide. Next, ignore all the headers he mentions, but remember the functions. The header you need is <ws2_32.h> IIRC - but if you look in VC++'s help under "WSAStartup", you'll find the right header name. Then just wrap your socket code between calls to WSAStartup() and WSACleanup() and you can use the Unix-style sample code.
Xprotocol
02-13-2003, 09:01 AM
Thanks for the help!