M
M
mixailflash2013-12-19 20:55:19
C++ / C#
mixailflash, 2013-12-19 20:55:19

Is it possible to read a file from the network without connecting specific C ++ libraries, but using only standard ones?

Good afternoon.
Can anyone tell me whether it is possible to read a file from the network without connecting specific libraries, and using only standard ones.
Please provide an example code if possible. Even if it will be several hundred lines of code. I googled, but I didn’t find anything working either you need to connect winApi or you need to load and connect curl.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Monnoroch, 2013-12-19
@Monnoroch

There is no networking in the standard library. The network is always platform-specific code. Either boost, Poco, or something else to choose from.

S
sdevalex, 2013-12-19
@sdevalex

This can't happen in the standard library, except perhaps...
The OS takes care of the network and only it provides the API.

I
Ilya Evseev, 2013-12-20
@IlyaEvseev

What protocol should be used to receive a file from the network? http?
Calls socket, connect, send, recv are the same in all operating systems, but the header files are different.
Plus, Winsock needs to be initialized in Venda:
www.cplusplus.com/forum/windows/17264/#msg86895
libCURL is written for such cases.

A
afiskon, 2013-12-20
@afiskon

Of course, this will be very difficult to do with standard tools. Use curl.

A
AxisPod, 2013-12-20
@AxisPod

What's wrong with connecting curl? Everything is done quickly and easily. Bicycle building in programming is the most important evil.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question