|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Linux socket programming
Where can I find a good introduction to socket programming?
|
|
#2
|
||||
|
||||
|
http://docs.sun.com/db/doc/802-5886...=sockets&a=view
... though this is for Sun, it should be largely the same ...
__________________
Jon Sagara "Me fail English? That's unpossible!" |
|
#3
|
||||
|
||||
|
__________________
"A poor programmer is he who blames his tools." http://analyser.oli.tudelft.nl/ |
|
#4
|
||||
|
||||
|
Try out Unix Network Programming by W. Richard Stevens. This is probably the Bible of Network Programming and reading just Volume I will probably make you more knowledgable about sockets than most other books. It covers socket programming very comprehensively and practically all network programming books and articles always have this book in their list of references.
|
|
#5
|
|||
|
|||
|
Linux socket programming
Thanks people,
I have been trying to understand the info on the web about sockets, threading and multiplexing. I find that jumping around from site to site can be too much information to take in at once. I will visit the links and buy the book... Thanks again. |
|
#6
|
||||
|
||||
|
Stevens' "Unix Network Programming" is indeed considered the "Bible of Network Programming", but if you are looking for an introduction then maybe a "tract" would be more useful at this point. Stevens may prove to be too comprehensive for you right now.
As an introduction, I would recommend "TCP/IP Sockets in C: Practical Guide for Programmers" by Michael J. Donahoo and Kenneth L. Calvert, Morgan Kaufmann Publishers, 2001 (ISBN 1-55860-826-5). It's 110 pages long and costs $15. OTOH, "Unix Network Programming" comes in two volumes at about $70 each, $140 total -- not even Amazon.com offers a discount -- and appears to cover all of POSIX interprocess communication as well as a non-sockets API called XTI. The previous edition of "TCP/IP Sockets in C: Practical Guide for Programmers" was called "The Pocket Guide to TCP/IP Sockets: C Version" (ISBN 1-55860-686-6) and is still out in the bookstores and covers pretty much the same material. I started out studying and researching all I could and found myself in "analysis paralysis", afraid to try to write a sockets program until I understood it all. "The Pocket Guide to TCP/IP Sockets: C Version" got me coding almost immediately. So far in my spare time, I've written time clients and servers, an embedded telnet client, and a "man in the middle" utility that I used to capture and analyze telnet traffic (for writing the embedded client). Their books (they've also written one for Java) are a good introduction to sockets programming that can get you started fast. It also has a good API reference section in back which I keep in my Palm for reference. You should also visit their web sites: http://cs.baylor.edu/~donahoo/PocketSocket/ and http://cs.baylor.edu/~donahoo/practical/CSockets/ for the source code and for information on writing Winsock applications. It turns out that a Unix sockets app can be converted to Windows with just a few minor changes (a common task for me, since I'm the only one at work with a Linux box); the process is described in a short document on their site, "Transitioning from UNIX to Windows Socket Programming" by Paul O'Steen (http://cs.baylor.edu/~donahoo/pract...dowsSockets.pdf ). Then after you have gotten a good introductory start, Stevens would be more useful. Also, since you named this thread "Linux Socket Programming", you might want to look at Warren Gay's "Linux Socket Programming by Example" (ISBN 0-7897-2241-0). It starts with the basics and moves on to more advanced topics, like . For example, I was able to verify my design for a broadcast client application, which I have not seen covered elsewhere. Also, you might want to check out Analyser's "shameless plug". I found Beej's Guide to be helpful. BTW, sockets are the easy part. Working out the interaction between servers and clients are slight more difficult. The difficult part is researching the application-layer protocols, like telnet. For that, you will need to start digging through the Requests for Comment (RFCs). Good luck and have fun! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Linux socket programming |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|