f



Any good books on "Linux Socket prog", also on "Linux Network prog"?

Guys:

Any good books on "Linux Socket programming", also on "Linux Network
programming"?. Any valuable on-line tutorials. Appreciated.

0
globalswamy (188)
10/14/2005 11:56:51 AM
comp.os.linux.networking 15677 articles. 0 followers. Post Follow

11 Replies
661 Views

Similar Articles

[PageSpeed] 26

GS wrote:

> Guys:
> 
> Any good books on "Linux Socket programming", also on "Linux Network
> programming"?. Any valuable on-line tutorials. Appreciated.

I have never seen one, but since sockets on Linux are basically standard BSD or 
Unix sockets, try searching for "Unix socket programming" or "Berkeley socket 
programming".


-- 
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
0
phil135 (118)
10/14/2005 3:55:50 PM
Does "Unix socket programming" by Richard Stevens book can be used for
Linux socket programming too?. 

Thanks.

0
globalswamy (188)
10/14/2005 4:05:19 PM
Especially looking for beginner who wants to enter into Linux
programming (Network side), looking for some books which tells basics

0
globalswamy (188)
10/14/2005 4:06:21 PM
Especially looking for beginner who wants to enter into Linux
programming (Network side), looking for some books which tells basics

0
globalswamy (188)
10/14/2005 4:06:26 PM
GS wrote:
> Especially looking for beginner who wants to enter into Linux
> programming (Network side), looking for some books which tells basics
> 

I don't want to put a dampener on your enthusiasm, but if you are
wanting to do it properly the POSIX way, I wouldn't even consider it
unless you are comfortable programming 'C' at the level of understanding
how pointers work.

You could always consider Java - piece of cake in Java!

Steve
0
nobody7467 (22)
10/14/2005 4:26:00 PM
Is there any on-line text books available?. I did serach, but didn't
find any good ones?. Thanks.

0
globalswamy (188)
10/14/2005 9:40:56 PM
GS wrote:
> Is there any on-line text books available?. I did serach, but didn't
> find any good ones?. Thanks.
> 

Nope.

There are a number of really good books, and they are not cheap, but all
the POSIX sockets stuff is freely available - just download the source
code :)

If you are cool with this following bit of code, then you shouldn't have
a problem:

serveradd.sin_family = AF_INET;
serveradd.sin_port = htons(portnum);
memcpy(&serveradd.sin_addr,
         host->h_addr_list[0],
           sizeof(serveradd.sin_addr));
err = connect(mysock, (sockaddr *)
           &serveradd, sizeof(serveradd));

On the other hand, if you look at this bit of code and think `WTF?',
don't even think about it!

Steve
0
nobody7467 (22)
10/14/2005 11:37:06 PM
Steve,

Great, I understand, assign portnum and open a socket. What I couldn't
able to understand is, what is the port number I have to assign. For
example, I wanted to run server on one Linux machine and client on
another machine, both are on LAN (one is 192.168.1.2 and other one is
192.168.1.3), can I use any port number? or Is there any fixed port
number. I am little bit confuse what port number I have to use?. Also
whether I have to use STREAM or DATAGRAM kind of service?.

Thanks in advance.

0
globalswamy (188)
10/15/2005 12:05:15 AM
GS <globalswamy@hotmail.com> wrote:
> Great, I understand, assign portnum and open a socket. What I couldn't
> able to understand is, what is the port number I have to assign. For

For a client program you typically don't assign a port. What you do is
let the system select a source address based on it's routing tables and
the host you're trying to talk to, and let it select a random
unprivileged port from the pool of available ones. Stevens covers this
in detail, it's done by using special constants for the source address
and port. The book you want is:

Unix Network Programming volume 1: Sockets and XTI
by W. Richard Stevens
published by Prentice-Hall

-- 
death.net: because for some problems there's only one solution.
0
tknarr (59)
10/15/2005 1:51:22 AM
Will it work if I run server on one system and client on another
system, both are on LAN?. This is to test simple client-server
application. Thanks.

0
globalswamy (188)
10/15/2005 5:04:06 PM
In article <1129291011.779787.205230@g14g2000cwa.googlegroups.com>,
globalswamy@hotmail.com (GS) writes:

> Any good books on "Linux Socket programming", also on "Linux Network
> programming"?. Any valuable on-line tutorials. Appreciated.

A quick guide to get you started is "Beej's Guide to Network
Programming".  Last time I looked, you could find it at
http://www.ecst.csuchico.edu/~beej/guide/net/

-- 
/~\  cgibbs@kltpzyxm.invalid (Charlie Gibbs)
\ /  I'm really at ac.dekanfrus if you read it the right way.
 X   Top-posted messages will probably be ignored.  See RFC1855.
/ \  HTML will DEFINITELY be ignored.  Join the ASCII ribbon campaign!

0
cgibbs (332)
10/16/2005 5:23:00 PM
Reply:

Similar Artilces:

"Heroes" again, or "Linux in the Wild" or "Linux on TV", this time with screenshots
Allrighty, doubters and wintrolls. I've posted some screen shots from the KDE appearance on NBC's new series "Heroes" http://www.newtnotes.com/?itemid=189&catid=3 Linux in the wild. What more proof do you need? later... -- JDS | jeffrey@go.away.com | http://www.newtnotes.com DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/ JDS wrote: > Allrighty, doubters and wintrolls. I've posted some screen shots from the > KDE appearance on NBC's new series "Heroes" > > http://www.newtnotes.com/?itemid=189&catid=3 ...

"Suse Linux is ideal"..."Linux is perfect for anything"
"Conclusion SuSE Linux is ideal for anyone. Plain and simple. If your PC is reasonably new and has a large-ish hard drive Linux is perfect for anything." http://www.amazon.co.uk/product-reviews/B00006JT8L/ref=cm_cr_dp_all_helpful/279-0064730-3629436?ie=UTF8&coliid=&showViewpoints=1&colid=&sortBy=bySubmissionDateDescending It just w.... ...

"/a" is not "/a" ?
Hi everybody, while testing a module today I stumbled on something that I can work around but I don't quite understand. >>> a = "a" >>> b = "a" >>> a == b True >>> a is b True >>> c = "/a" >>> d = "/a" >>> c == d True # all good so far >>> c is d False # eeeeek! Why c and d point to two different objects with an identical string content rather than the same object? Manu Emanuele D'Arrigo wrote: >>>> c = "/a" >>>&...

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By c...

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

Win7: "almost a dream OS", Linux: "WHAT A NIGHTMARE !!!"
"It's nicer than Vista, faster than XP -- almost a dream OS." http://www.computerworld.com/s/article/9136192/Windows_7_How_low_can_you_go_?taxonomyId=89&pageNumber=3 "Of importance in the spec was 8GB RAM and I speced a NVidia 8600 GTS graphics card .... WHAT A NIGHTMARE !!! Since then ... I�ve installed various flavors of Linux and continually had lockups/hard freezes (No Num Lock or Caps lock... and you can�t ping the machine). Flavors of Linux that I tried were Ubuntu (7.04 64bit, 7.10 32bit and 64bit, 8.04 Alpha4 64bit), Debian Etch 64bit, Debian Lenny 64bit. Al...

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

turdv, tell us again how "Linux rules the world" but is also "obscure".
It's always funny to watch a double-talking, "intellectually superior" asshole make a fool of himself. shitv: "Linux rules the world" <0mnaj99ie96u3g7lotvjtiuhk1hkk8033q@4ax.com> shitv: "the obscurity of Linux" <fgh7da9vre488f53ig2ilgjofr15lf1rvh@4ax.com> ...

Linux "advocate$": "We love Windows money!"
That's why you insist on making a living with Windows your entire lives. Hypocrites. On Thu, 20 Aug 2009 00:18:58 -0400, DFS wrote: > That's why you insist on making a living with Windows your entire lives. > > Hypocrites. It's true..... You know, in my field, entertainment, we have the Mac crowd and the Windows crowd and while we respect each other no Machead will be caught with a Windows machine and vis-verse. We also don't have the stupid wars that go on with Linux vs Windows etc. We respect each other. I look at COLA and instantly it's a complete far...

[News] "Linux" Deserves "More Damn Respect"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 10 tech firms that should get more damn respect ,----[ Quote ] | 8. Linux | | It's a movement rather than a firm, of | course, but we think Linux still deserves to | be here: from making netbooks work to | powering Android phones and generally making | Microsoft get its act together, Linux has | been enormously influential. It might be | considered more cool if journalists could get | through just one Linux-mentioning article | without also mentioning beards and hippies. `---- http://www.techradar.com/news/world-o...

Problem with "system" and the linux "su" command
I'm trying to write a little C program to run under linux, which must gain root so it can then shutdown the computer. I can get the code to execute the su command via system("su"), but once su comes into action, my program it's halted and su takes over. Because of this, I can't get my program to write the password su asks. I habe no idea on how to get C to communicate with other running processes such as su, but I understand it can be done. Any ideas on how I can achieve this? Martin Sigwald msigwald@gmail.com wrote: > I'm trying to write a little C program to ...

7: "Most people know of Linux".... (p)Rick: "the overwhelming number of people don't know Linux exists"
Get with the herd, bozos. On Jun 1, 2:08=A0am, DFS <nospam@dfs_.com> wrote: > Get with the herd, bozos. Groupthink, aka herd mentality, as heard in the street. These Linux clowns are like a herd of cats though, they're all over the map--explains the 1%. RL On Mon, 31 May 2010 16:13:45 -0700 (PDT), RayLopez99 wrote: > On Jun 1, 2:08�am, DFS <nospam@dfs_.com> wrote: >> Get with the herd, bozos. > > Groupthink, aka herd mentality, as heard in the street. > > These Linux clowns are like a herd of cats though, they're all o...

"out of memory" error message and "segment violation" or "segmentation fault (on linux)": the partially solution
Dear all, try these solution (origin support matlab): type the command line at the top of your .m file: feature accel off You can type the same at prompt matlab. If you are lucky, the message diseppaers. Type feature accel on for toggle (on is the default mode). Alain, who as very big experience with "out of memory and segmentation fault" ...

Vodaphone drops Linux netbooks
<quote> Vodafone has dismissed the preinstallation of Linux onto its netbooks, citing consumers' perception that netbooks are equivalent to laptops in their functionality. David Pollington, the operator's head of consumer and internet technical research, said on Wednesday that netbooks - which originally came with Linux rather than Windows as their operating systems - had originally been intended as always-on web-browsing devices, but users had misinterpreted their purpose. "Unfortunately, when the public got hold of these devices, they thought they were small PCs,...

Linux: "not good at all"
"I'm running running; 2007 PCLinuxOS for i586 .... It's crashed more times today than I can bother remembering. Earlier today it crashed trying to submit a form, taking the entire OS out with it, such that ctrl.alt.del wouldn't bring up the sys menu and needed powering down to reset. It crashed just now when I tried to refresh a tab and move to another. .... All in all, I vote... not good at all." #4 and #5 at http://www.pclinuxos.com/index.php?option=com_smf&Itemid=58&topic=43955.0 DFS wrote: > "I'm running running; > 2007 PCLinuxOS for i...

Win+Linux Network "see each other"
I have PPPoE (verizon dsl). I have a D-Link Router, to which my WIndows '98 machine and my Linux REd Hat 8.0 are both attached. It is, of course easy to let them share the internet connection... How do I (step by step) configure everything so that they can "see" each other... So they can share stuff like the printer, etc. and possibly share files... In the future i want to house a webserver on my linux and an application server on my win'98 machine... or vice versa, etc... anyone (as a p.s.) know any other practical uses for letting them "see" each other? thanks David E. wrote: > I have PPPoE (verizon dsl). I have a D-Link Router, to which my WIndows '98 > machine and my Linux REd Hat 8.0 are both attached. It is, of course easy to > let them share the internet connection... How do I (step by step) configure > everything so that they can "see" each other... So they can share stuff like > the printer, etc. and possibly share files... In the future i want to house > a webserver on my linux and an application server on my win'98 machine... or > vice versa, etc... anyone (as a p.s.) know any other practical uses for > letting them "see" each other? > thanks > > Do a google search on Samba or Samba configuration. This is a fairly common question, and will be answered better in any howtos on the net than I could answer. ...

[News] .NET on Linux -- "Yay!" or "Yay [Sarcasm /]"?
Hotskills: Mono lets .net developers run applications on Linux ,----[ Quote ] | To Mono's founders, the proprietary/open-source battle was less important | than issues of co-existence and the most appropriate platform for the job. | According to Justin Steinman, Novell's director of product marketing for | Linux and open platform systems, and the man in charge of selling Mono to the | world, "Mono essentially enables you to run .net applications on Linux," | giving you the choice of developing for either platform knowing that it will | run on both. `---- http://...

Why does "Linux Company" IBM support a "crime against humanity" ????
The answer is money. It's always about money for these "linux companies" like IBM and Google. <quote> Electronic Frontier Foundation February 5, 2015 | By Nadia Kayyali EFF Files Amicus Brief in Case That Seeks to Hold IBM Responsible for Facilitating Apartheid in South Africa This case isn't about general-purpose technology being cleverly misused by a malicious government. Rather, this case is about corporate collaboration in governmental human rights abuses, through the creation of a customized technology solution for the known and intended purpose of...

More "quality code" (as opposed to "linux slopware") from MS
http://www.heise-security.co.uk/news/100789 DFS will tag this a "feature" -- Are you sure you REALLY want to read this with Netscape? [ ] YES Go to the Microsoft site and download Internet Explorer [ ] NO Go to the Microsoft site and download Internet Explorer [ ] LOCK UP Crash Windows and soft reboot [ ] BSOD Crash Windows and hard reboot On 2007-12-18, Peter Köhlmann <peter.koehlmann@t-online.de> claimed: > http://www.heise-security.co.uk/news/100789 > > DFS will tag this a "feature" It *is* a feature if the goal is to push the numbers up for ...

Linux "community"--with "friends" like that, who need enemies?
A while ago I asked an innocent question on what the best distro to download is for a Pentium II system with 300 to 500 MB RAM and a 40 GB HD is. Instead of help, I got invective. This is the vaunted "Linux community"? With "friends" like that, who need enemies? RL On Sun, 28 Oct 2007 04:29:55 -0700, raylopez99 wrote: > A while ago I asked an innocent question on what the best distro to > download is for a Pentium II system with 300 to 500 MB RAM and a 40 GB > HD is. Instead of help, I got invective. > > This is the vaunted "Linux community"...

Watch how a Linux "advocate" objects to "the evil of Microsoft"
On cola: turdv: "I've always objected to the evil of Microsoft" http://groups.google.com/group/comp.os.linux.advocacy/msg/80f7d039e11e8e4f?hl=en In real life: turdv: X-Newsreader: Forte Agent 1.92/32.572 (Windows only) turdv: "I buy a lot of Windows PC's to use as test stations, and I've been buying refurbished XP machines and have no plans to change." http://groups.google.com/group/comp.os.linux.advocacy/msg/540e8d3903f1e9cd?hl=en turdv: "Win7 Home Premium OEM is available for $100 online... My daughter runs it" http://groups.google.com/group/comp.os.linux.advocacy/msg/80f7d039e11e8e4f?hl=en turdv: "Windows is the right choice for my daughter" http://groups.google.com/group/comp.os.linux.advocacy/msg/dc97abd9c7fda51f?hl=en Isn't that special? "DFS" <nospam@dfs.com> wrote in message news:ju15ls$d70$1@dont-email.me... > On cola: > > turdv: "I've always objected to the evil of Microsoft" > http://groups.google.com/group/comp.os.linux.advocacy/msg/80f7d039e11e8e4f?hl=en > > > > In real life: > > > turdv: X-Newsreader: Forte Agent 1.92/32.572 (Windows only) > > turdv: "I buy a lot of Windows PC's to use as test stations, and I've been > buying refurbished XP machines and have no plans to change." > http://groups.google.com/group/comp.os.linux.advocacy/msg/540e8d3903f1e9cd...

Is the "posix kernel API" the same as the "linux system calls"?
I'm trying to understand some general things about the linux kernel compared to the posix kernel API and system calls. So here are my questions: Is the "posix kernel API" the same as the linux "system calls"? If not, what is the difference? >From what I understand, system calls are the only interface that user programs can use to interact with the kernel. Are system calls a form of kernel function? Can/do kernel functions call system calls? BR! "dspfun" <dspfun@hotmail.com> wrote in message news:1155135433.146861.158800@75g2000cwc.googlegroup...

Gary Sokolich """"""
"""""""""" http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich , Newport Beach, California �V File B-29812 - It was alleged that Dr. Sokolich unlawfully offered or attempted to practice engineering in Texas (...) Dr. Sokolich chose to end the proceedings by signing a Consent Order that was accepted by ...

Web resources about - Any good books on "Linux Socket prog", also on "Linux Network prog"? - comp.os.linux.networking

Resources last updated: 3/14/2016 10:14:41 AM