LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   (C++) Unix/Linux Networking Socket tutorials ? (https://www.linuxquestions.org/questions/programming-9/c-unix-linux-networking-socket-tutorials-215468/)

Dark Carnival 08-09-2004 02:40 PM

(C++) Unix/Linux Networking Socket tutorials ?
 
I bought some books (and find my wallet exhausted might I say) so I can't afford another book that focuses on Linux as opposed to the neutral books that goes all windows when the networking chapter opens up (how could I know, I am/was a newb!)

Regardless, I've read a bit and think I have a (somewhat) working understanding of the c++ basics, and I really would like to dive into the socket programming now.. So is there any (non after-college paper) on this ?

I ran into very few papers, and they were study material for network & communications educations ( i believe). And for a 16 year old, that's a bit much.

I *really* hope someone would point me in the right direction, thanks a whole bunch in advance! (And I'd rather not run over the winsock.h tutorials in my book cause I have no intentions of developing software for windows (at least yet!))

Mara 08-09-2004 02:53 PM

A short search and I have 2 examples. One in C, second in C++. I'd say it's better to start from the first one (just easier to understand, C++ one has too many classes to make the process clear). So there are the links: http://www.coding-zone.co.uk/cpp/art...gramming.shtml and http://www.linuxgazette.com/issue74/tougher.html

Dark Carnival 08-09-2004 03:16 PM

I ran over the top one once. Although it makes me wonder:
Can I really use this C code and compile it as cpp ? or will libraries, calls etc be different ?

Mara 08-09-2004 03:22 PM

You can, no problem. A correct piece of C code is also a correct piece of C++ code.

Dark Carnival 08-09-2004 03:26 PM

Just brilliant :) That's why I skipped that site in the first place, thanks :)

infamous41md 08-09-2004 04:28 PM

this is the definitive tutorial:
http://www.ecst.csuchico.edu/~beej/guide/net/

max_sipos 08-09-2004 04:58 PM

book @ http://www.advancedlinuxprogramming.com/

has a chapter dealing with interprocess communication (including sockets for communication over network). there is also a chapter where they implement a full-fledged example application (some sort of a mini web-server serving pages that show system info).

Hope that helps,

---
Maksim Sipos

Hko 08-09-2004 05:43 PM

Note that the book mentioned by max_sipos is freely downloadable entirely (each chapter as one PDF) from the site.


All times are GMT -5. The time now is 03:06 AM.