O
O
Odyssey12015-12-25 23:23:19
C++ / C#
Odyssey1, 2015-12-25 23:23:19

C++ network. How to work with network in C++?

Goodnight! I'm new to C++, so I'm actively learning it, but there is not a word about networking in the books. I know that there are libraries ACE, POCO, BOOST (googled), but I don’t know anything about them anymore.
Can anyone briefly talk about all the ways to work with the network in C ++ (or at least the most popular ones)? And, if possible, methods without using third-party libraries (only standard ones). Interested in both HTTP and Client-Server. And if there are also books on this topic, then it would be ideal.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
O
Oleg Tsilyurik, 2015-12-25
@Odyssey1

To work with the network (today, the network is almost only called TCP / IP), such a completely abstraction as sockets (in the program code) is used.
You can take a look here: Network Programming in Linux .
As for HTTP ... that's a completely different story - you need to first deal with the layers of the network model, the network stack. HTTP is an application layer protocol. In C++, nothing is specifically needed for an application-level protocol; this is no longer directly related to network programming.

V
Vladimir Martyanov, 2015-12-25
@vilgeforce

bsd socket, curl, WinInet.

R
romy4, 2015-12-25
@romy4

Oh really?! Doesn't google "c++ networking"?

S
Stanislav Makarov, 2015-12-26
@Nipheris

I know that there are libraries ACE, POCO, BOOST (googled), but I don’t know anything about them anymore.

well find out! Learn about Boost::Asio, learn about cpp-netlib built on top of it (you will just have an HTTP client and server)

W
whoami?root root_toor, 2016-02-13
@1q2w1q2w

  1. *Winnet
    In order not to go far: Article on Habré
    The most commonly used, as far as I know, Boost and Qt. POCO
    and libcurl make it easier to implement, but not so flexible . From myself I recommend Qt ... but only if you need a GUI and something other than network classes (heavy, but beautiful)) And Boost is closest to the standard (even some parts of it were included in the standard), so choose) By the way , to the question of choice, for interest, the number of vacancies for boost and qt struck: 77/72 in Moscow, so almost parity.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question