September 25th, 2003, 12:39 PM
C Socket programming in windows.
hi there ppl.. well i just startet learning C read this book.. Teach yourself C in 21 days hehe :) well i loved it and well want too do something. and well i think developing somekind of client/server program would be fun..but im very limitet on funds for books and whatso ever.. and wondering if any of your ppl might have any help for me like a good link or a e-book you could send me...on the subject "socket programming in windows" and yes i have no idea whatsoever how too ive looked on a few sources codes that couldent even be compiled :( plz help me would be apreciatet..
//ovre and out soul12
September 25th, 2003, 01:48 PM
Search around here for 'socket' and 'windows', you should find some examples. You will have to be sure to include the networking headers and libraries when you compile. If you don't yet know how to do that, you will have to try to find a complete project that compiles. Put some research effort into it before asking for more help, after all, that is how we all got started.
September 25th, 2003, 01:51 PM
September 25th, 2003, 02:01 PM
thnx for the link...and i did doo my research on this forum just got tired after looking trough page 4 and google..turned blank on this 1...only unix code..and since im new dident help me much..so asking you guys hoping for you too help me on..i cant be the only 1 with this problem so..
September 25th, 2003, 04:01 PM
Although they are far from complete, I've started putting some pages up on the Web on sockets programming starting at http://members.aol.com/DSC30574/sockets/index.html . My resources page at http://members.aol.com/DSC30574/sockets/resources.html lists a number of compilers, books, and web sites, including Beej's which is good but which doesn't really deal with Winsock. My own page on Winsock programming is at http://members.aol.com/DSC30574/sockets/winsock.html and also contains links to other Winsock resources.
Now, the thing about Winsock vs UNIX in network programming is that almost all of the UNIX functions are supported in Winsock. So except for some very UNIX-specific things like forking processes, you can take a UNIX sockets program and convert it over to Winsock with only a few changes. So what you learn on those sites that deal with UNIX sockets programming is almost directly applicable to Winsock programming.
For that matter, here's my basic how-to straight off my page:
Complete instructions with pictures for creating in Visual C++ a Win32 console application (equivalent to a DOS application) that supports WinSock can be found in the PDF file, "Transitioning from UNIX to Windows Socket Programming," by Paul O'Steen, http://cs.baylor.edu/~donahoo/practi...owsSockets.pdf .
An excellent book for getting started with sockets programming is "The Pocket Guide to TCP/IP Sockets: C Version" by Michael J. Donahoo and Kenneth L. Calvert (second edition title is "TCP/IP Sockets in C: Practical Guide for Programmers"). $15. While they deal entirely in UNIX, that information is almost directly applicable to Winsock. On their site they have both the source code of their UNIX examples (http://cs.baylor.edu/~donahoo/Pocket.../textcode.html ) and of the same programs converted over to Winsock (http://cs.baylor.edu/~donahoo/PocketSocket/winsock.html ).
There are a few compatibility issues in Winsock, so you should also visit the Winsock Programmer's FAQ at http://tangentsoft.net/wskfaq/ . Besides answers to the frequently asked questions, it also contains articles and sample programs. Of particular interest in the matter of compatibility issues is the article, "Winsock's Compatibility With BSD Sockets", at http://tangentsoft.net/wskfaq/articl...atibility.html .
Last edited by dwise1_aol; September 25th, 2003 at 04:07 PM.
September 25th, 2003, 05:57 PM
should keep me reading a bit..keep em coming :)