C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 23rd, 2003, 04:18 PM
spade99 spade99 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 11 spade99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Linux socket programming

Where can I find a good introduction to socket programming?

Reply With Quote
  #2  
Old January 23rd, 2003, 05:09 PM
jonsagara's Avatar
jonsagara jonsagara is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: USA
Posts: 286 jonsagara User rank is Private First Class (20 - 50 Reputation Level)jonsagara User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 7 m 23 sec
Reputation Power: 7
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!"

Reply With Quote
  #3  
Old January 23rd, 2003, 05:20 PM
Analyser's Avatar
Analyser Analyser is offline
*bounce*
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2002
Location: Delft, The Netherlands
Posts: 510 Analyser User rank is Corporal (100 - 500 Reputation Level)Analyser User rank is Corporal (100 - 500 Reputation Level)Analyser User rank is Corporal (100 - 500 Reputation Level)Analyser User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 20 h 44 m 4 sec
Reputation Power: 9
Send a message via ICQ to Analyser
__________________
"A poor programmer is he who blames his tools."
http://analyser.oli.tudelft.nl/

Reply With Quote
  #4  
Old January 23rd, 2003, 06:38 PM
Scorpions4ever's Avatar
Scorpions4ever Scorpions4ever is offline
Banned ;)
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Nov 2001
Location: Glendale, Los Angeles County, California, USA
Posts: 7,589 Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level)Scorpions4ever User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 40 m 58 sec
Reputation Power: 1001
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.

Reply With Quote
  #5  
Old January 24th, 2003, 09:25 AM
spade99 spade99 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 11 spade99 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old January 31st, 2003, 03:11 PM
dwise1_aol's Avatar
dwise1_aol dwise1_aol is offline
Contributing User
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jan 2003
Location: USA
Posts: 3,867 dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)dwise1_aol User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 2 h 46 m 57 sec
Reputation Power: 480
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!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Linux socket programming


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT