[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

C++ reading

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 6
Thread images: 2

File: C.png (5KB, 550x380px) Image search: [Google]
C.png
5KB, 550x380px
Requesting a good book title about C++ socket programming under linux for somewhat understand the basic programmnig with C++.
>>
File: cover.gif (74KB, 535x670px) Image search: [Google]
cover.gif
74KB, 535x670px
>>
>>60233570
there is no good way to use sockets in C++. it's all dusty old C code.
wait for the networking TS.
>>
>>60233570
1. there's no need for "C++ socket programming under linux". Sockets are a C library, no need to add '++'
2. Socket programming is best documented by the manpages. It is the ultimate documentation resource, and the interface has been consistent since decades. Lookup manpages for socket(2), bind(2), listen(2), accept(2), connect(2), ip(7), socket(7), tcp(7), udp(7), recv(2), send(2), read(2), write(2) and it should get you going for basic socket programming. (in case you don't know, numbers represent the manpage category, so just type 'man 7 socket' if you want to read socket(7) manpage). Add getaddrinfo(3) for name resolution. The manpages include basic examples, and you can find plenty online. A book is seldom necessary, but you can take >>60233611 or "Advanced UNIX Programming" - very old books (from the 80's) that are still fully valid today since basis UNIX API doesn't change that much
3. The real deal with network programming aren't the sockets themselves, but the asynchronous I/O. You need to learn about things like poll(2) (or select(2), that is a bit simpler, but poll is preferable). For more complex applications, you should look into event frameworks, libraries that abstract a lot of things for you, but for simple things just using basic functions is easier.
4. Keep in mind that all these functions are VERY generic (unlike Windows) and work the same way for very different protocols and socket types. You can work with raw IP sockets, or TCP, or Ethernet, or with terminals, UNIX domain sockets, files using same functions.
5. For more higher-layer protocols like HTTP, look into libraries like libcurl(3)
>>
>>60233570

Advanced Programming in the UNIX Environment by Stevens and Rago
Unix Network Programming, Volume 1: The Sockets Networking API by Stevens, Fenner, and Rudoff

For more theory:
Computer Networks: A Systems Approach by Peterson and Davie
Computer Networks by Tanenbaum
>>
Wow, thanks a lot guys. I really interested in making something network related but i have no idea at all.
Thread posts: 6
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.