Jump to content
Che

[C++ Resources] The C++ Network Library Project

Recommended Posts

The C++ Network Library Project

Capture.jpg

Overview

The project aims to build upon the latest C++ standard (currently C++11) to provide easy to use libraries for network programming. We use the latest compiler versions and features with an eye on pushing the boundaries on leveraging what's available in C++.

Currently the library contains an HTTP client and server implementation, a stand-alone URI library, a network message framework, and some concurrency tools.

The project welcomes contributions from people interested in joining the effort. See the section on Project Policies for more information on getting involved.

Mai multe aveti aici: cpp-netlib: The C++ Network Library

Cautam acum ceva timp sa fac un program care sa citeasca sursa unei pagini web: https://rstforums.com/forum/94545-c-ajutor-network-connection-ping-check-online-si-request-timeout.rst

Pana la urma am reusit cu ajutorul baietilor de pe forum. Dar cautand eu pe net cum sa fac chestia asta am dat si peste aceasta librarie cu care se poate crea un program de asta de tip client (chiar si unul de tip server) cu care sa faci astfel de conexiuni, requesturi etc.

Se realizeaza ceea ce vrei muuult mai usor.

Un exemplu aveti aici:


#include <boost/network/protocol/http/client.hpp>
#include <string>
#include <iostream>
int main()
{
boost::network::http::client client;
boost::network::http::client::request request("http://www.example.com");
request << boost::network::header("Connection", "close");
boost::network::http::client::response response = client.get(request);

std::cout << body(response);
}

sursa: How can I fetch data from a website inside a C++ program - Stack Overflow

Pare usor de folosit insa nu am folosit aceasta librarie fiindca mi se pare mult mai mare decat daca ai face direct in C++, insa pentru incepatori e foarte buna. Si ai de descarcat si ptr. Linux si pentru Windows.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...