HFX Forum

Programming => Programming Discussion => Topic started by: karma on March 03, 2004, 09:51:52 AM

Title: Book for network prgramming
Post by: karma on March 03, 2004, 09:51:52 AM
Well I am a Ist yr engg. student . I am intrested in network programming would anyone please suggest good books in this regard .
Also is it better to do network programming in C or Java .or any other language ..Kindly give some suggestion
Title: Re:Book for network prgramming
Post by: Cobra on March 03, 2004, 02:14:02 PM
I clicked on reply for this post thinking i had a link handy for some books for ya ... And well guess what.. I don't!

I personally don't use Java, for no other reason other than i don't want to start working on another language. So based on C. Not sure how familier you are with C, so i would suggest going through a few "Teach yourself C" type books.

Here is a link to an online C book:
http://www.strath.ac.uk/IT/Docs/Ccourse/tableofcontents3_1.html that im sure you will find of use.

But have a root around for some socket programming books etc .. and there are quite a few books geared towards Network Programming...

If i come across those links i will post them up here.
Title: Re:Book for network prgramming
Post by: karma on March 04, 2004, 09:07:49 AM
Thank u cobra  ! Well i had C n my 1st semester and right now i have java in second sem .. well i can write programs in C  with comfort that is why i wanted to hone my C knowledge by moving to Network Programming but i found some of my seniors working on java networking APIs and i was whether to start the network programming in C or not as this is an extra effort from my side as this topic in not in out programme course ..By the Thanks   a lot for the LInk...and please do tell me if u come to know anything in this regard
Title: Re:Book for network prgramming
Post by: Metgod on March 04, 2004, 11:52:40 AM
Hey there,

It really saddens me even more now, that I got ill (as usual) and I couldnt' finish my document on programming sockets under BSD with C... damn! It was looking nice too..

I can show you a link but not sure if it's what you're after. Can you tell me if there is anything specific you want to try first ? I have found quite a bit of info on sockets in the past and I'm sure they can be found again. Let me know and I'll get back to you as soon as I can.


Cheers,
Metty
Title: Re:Book for network prgramming
Post by: XT on March 06, 2004, 02:07:09 PM
If you want a book on network programming you MUST seek Richard Stevens' UNIX Network Programming series.. there are 3 books, but you can easily do with the first book if you just want sockets, if you also want to learn IPC get the second part also.. Stevens covers stuff that is not documented anywhere else.. and it is very well written and extensive.
Title: Re:Book for network prgramming
Post by: karma on March 07, 2004, 04:48:30 AM
Thanks XT ..Well Metgod actually i a intrested in topics related to  hacking and system security and for that i need to know network programming .I am a Comp. Sc. student
and apart from my studies i want to expore this area and i am on my own ..Well but i have friends like you over the net to help me out ...
Title: Re:Book for network prgramming
Post by: Metgod on March 07, 2004, 05:32:08 PM
Hey,

I'm really tired, so sorry if this seems like a short response. Been up all nigh the last two nights and I am bloody exhausted! anyhow..

Here is one source I used before.. I honestly don't remember what I used before to find ohter things.

http://www.ecst.csuchico.edu/~beej/guide/net/

As far as Richard Steven's book.. I have heard good and bad things about it.. I have one of them and I wasn't impressed with some things, but maybe its a bias or because I'm a stickler... don't know. But some really do like it.

There is a lot of stuff documented on the Internet if you know how and have the time/patience to get to it... not sure how much I kept, sadly.. I can suggest a few more things :

learn the protocols! read the RFCs if you must, read otehr documetns. The more you understand about protocols, the more you'll understand sockets. You'll see that raw sockets aren't really hard then, if you read the man pages on 'socket' etc.

Well I think I might go take a nap.. hope that helps and I can always try to help more if need be.

Cheers,
Metty
Title: Re:Book for network prgramming
Post by: karma on March 08, 2004, 12:17:39 AM
Thanks  a lot Metgod and the link is truly good i have also searched many other links also to complement it .Thanks again and yes (on a lighter note ..) i do have a lot of patience to pursue my goal ...
Title: Re:Book for network prgramming
Post by: XT on March 08, 2004, 03:16:43 AM
Hmm, stevens UNIX programming series is like the bible any network programmer should have! I don't see what is bad about it. The beej's guide I think is quite basic. Stevens books on UNIX Network Programming cover everything indepth. You know, if I'm programming and I want to see whether I can use this or that method on BSD/OS as well as on SUNs then I don't like to go looking for it on the net, I just grab this book and it's right there. It is very good to have especially if you want to write portable network code.
I don't see anything that could be bad about these books..
Title: Re:Book for network prgramming
Post by: Metgod on March 08, 2004, 10:50:38 AM
Yeah,

to be honest, I don't even know what I 'dislike' about that book. It could be a bad memory or something.. It's a good reference indeed. Yes, Beej's guide is rather basic, but remember we're helping someone who is just beginning :)

I have to say, though, that there is nothing that replaces trial and error (experimenting).. and that's how I learned (of course, I haven't touched it in quite some while so I lost some of my knowledge). I'll say though, that the RFCs helped me as did the man pages on the functions (socket etc) :)

I had fun around that time but I do have too many health related issues to keep that up (ok, ok, I'm back at coding again but it's a completely different kind).

But no, not a terrible book. It's simply a matter of personal preference. I am often fine with just man pages or so.. other times I like books.
Title: Re:Book for network prgramming
Post by: XT on March 08, 2004, 02:10:39 PM
Quote from: Metgod on March 08, 2004, 10:50:38 AM
Yeah,
to be honest, I don't even know what I 'dislike' about that book. It could be a bad memory or something.. It's a good reference indeed. Yes, Beej's guide is rather basic, but remember we're helping someone who is just beginning :)

I have to say, though, that there is nothing that replaces trial and error (experimenting).. and that's how I learned (of course, I haven't touched it in quite some while so I lost some of my knowledge). I'll say though, that the RFCs helped me as did the man pages on the functions (socket etc) :)

Well, I read alot of RFCs and only years later I started sockets programming. Later I got the stevens book and I was impressed especially of the background knowledge I hadn't known before, I even discussed some things that I found in the book with very knowledgeable people (people very advanced in networking) that didn't know some of these things.. mainly background knowledge, who developed what etcetera..
The only thing that is hard with the book is that it explains one thing only one time, then that coding practice is put in some header file and you never see it again. So my opinion is that the book is best kept as a reference. You don't really want to read all the +1000 pages...

But you're right.. hacking is and should be mostly about doing things yourself and reading code and stuff.. I remember reading SNMP RFCs till deep in the night :) that's the fun.
Title: Re:Book for network prgramming
Post by: Metgod on March 08, 2004, 06:35:25 PM
That was what I didn't like about the book.. it used headers all the time which was hard to go back and forth (if it's a topic you do not know well). What can I say.. it annoyed me a lot and I probably I might have a black and white attitude at times.

But very true, lots of good information, just keep it as a reference, not a true 'tutorial' (lack of a better word).

Cheers,
Metty
Title: Re:Book for network prgramming
Post by: XT on March 09, 2004, 03:27:00 AM
Yes, I think it's not really that good to learn from.. it's a good book, but it's best if you already have experience with network programming, using it as a reference and such..
Title: Re:Book for network prgramming
Post by: Spirit on May 05, 2004, 01:44:15 AM
Well as per the original question...

Beej's Guide to Socket Programming
or
BSD Socket Manual

1.) Beej's is a good tutor
2.) If you're working on Windows, BSD Sockets is Winsock


And C > *
Title: Re:Book for network prgramming
Post by: wilnix on August 14, 2005, 02:20:09 AM
I may be too late, but I picked up a book on Network Programming in python and it was amazingly easy to pick up and use. Look for books of this nature if you are still initerested...


Thanks,

wilnix
Title: Re:Book for network prgramming
Post by: XT on August 14, 2005, 08:40:51 AM
wilnix: That's because python is easiest language one can pick. It takes care of all the details. The downside is that you don't learn real network programming with it. To really learn about networking you need to program it in C. It is quite hard to write a highly robust network program in C, if you want for example to handle many connections simultaneously.
Title: Re:Book for network prgramming
Post by: Metgod on August 14, 2005, 11:27:19 AM
He already knows networking .... no need to relearn something he already knows damn well. Probably another reason he was able to pick it up easily.


Title: Re:Book for network prgramming
Post by: XT on August 14, 2005, 01:32:40 PM
... but the guy karma - who started this thread - obviously isn't. So i wouldn't suggest learning network programming using python to someone who is interested in network programming for the reasons i have given in my former post.
Title: Re:Book for network prgramming
Post by: Metgod on August 14, 2005, 04:02:48 PM
True enough. :)

Title: Re:Book for network prgramming
Post by: wilnix on August 15, 2005, 01:36:09 AM
I understand the situation, and that is why I chose Python for him. It is an easy way for him to grasp the basics first. Then he can dive into real sockets, services, etc...

I did not read every post to this thread, but having him jump into C, C++, or Perl may be a bit overwhelming for him...

I hope this helps,

Wilnix
Title: Re:Book for network prgramming
Post by: Link3 on May 09, 2006, 08:11:07 AM
If you want this book in electronic version, pm me.  :-X
Title: Re:Book for network prgramming
Post by: Metgod on May 09, 2006, 07:52:58 PM
which book ? Stevens ?

Would love that book if that's what you're referring to... I have it in hard copy but it's often useful to have the books in digital format...

Please let me know :)