Questions tagged [cpp-netlib]

C++ networking library; aims to become part of boost; built on top of Boost asio; has HTTP client and server; and general message template.

Cpp-netlib (http://cpp-netlib.org/) is a networking library.

It calls itself "a collection of Open-Source libraries for high level network programming"; its abstraction level is at the bottom of the OSI application layer. The library provides a general message template, http request and response messages built using the general message template, and HTTP client and (in proces) server code.

Cpp-netlib aims to become part of Boost. It relies havily on meta programming (i.e. templates). Cpp-netlib is built in top of Boost::ASIO (the asynchronous I/O library within Boost).

86 questions
1
vote
1 answer

Build cpp-netlib fail - not adding lib prefix

I'm trying to build cpp-netlib using cmake from cygwin. However cmake try to find the package without the lib prefix. And -DBoost_USE_STATIC_LIBS=ON won't resolve the problem! Here is my command line: cmake ../cpp-netlib-0.9.4/…
rcorreia
  • 549
  • 1
  • 9
  • 27
1
vote
0 answers

Using cpp-netlib on iOS Developpement

I'm building a crossplateform application and I'm trying to do some network request using cpp-netlib on ios. So far so good, until I use the call back function of cpp-netlib to avoid waiting for an answer (and froze my user interface). But when I…
bobby
  • 105
  • 1
  • 10
1
vote
2 answers

How to use cpp-netlib with Visual Studio 2010?

I'm trying to use cpp-netlib with Visual Studio 2010. I've built cpp-netlib and add .lib files to my project, but I can't compile them. --Environment Windows 7 x64 cpp-netlib 0.11.0 boost 1.55.0 Win32 OpenSSL v1.0.1f My code is here. #include…
fx-kirin
  • 1,906
  • 1
  • 20
  • 33
1
vote
1 answer

How to build cpp-netlib with MSVC (cmake)

I tried to do this in MSys git bash on my win 8.1 with MSVC 12 installed, and the latest cmake and git: $> git clone https://github.com/cpp-netlib/cpp-netlib.git $> cd cpp-netlib $> git submodules update --init $> cd deps ## here I unzip the boost…
dzada
  • 5,344
  • 5
  • 29
  • 37
1
vote
1 answer

cpp-neltib (and Boost) default string type in windows

I want to be able to get HTTP request header values that contain utf8 characters in a server built with cpp-netlib. I understand that there are two kind of wrapper classes for requests and responses depending on the used string type -…
Rudolfs Bundulis
  • 11,636
  • 6
  • 33
  • 71
1
vote
1 answer

Using find_package to include network library from cpp-netlib-0.9.4

I am using CMake to generate my make file. However, in one of my files, I need to use boost::network::uri::valid(uri_). So I have included the header file (#include boost/network/uri.hpp) and I am using the boost::network::uri::valid(uri_)…
Sarfraj
  • 312
  • 1
  • 5
  • 16
0
votes
1 answer

C++ (cpp-netlib) http listener - how to remove headers

I created an HTTP listener that accepts POST requests for files. I followed this template almost exactly: https://github.com/cpp-netlib/cpp-netlib/blob/main/libs/network/example/http/echo_async_server.cpp I start my listener like so:…
0
votes
0 answers

Can't Compile Code Using cpp-netlib Library

I have been trying to get this small program to work but keep getting compiler errors. I am using VS 2019 on windows and following this document. The program just gets the header of www.example.com and outputs the body response using the cpp-netlib…
0
votes
1 answer

CMake failing to build, can't find openssl

I'm trying to build cpp-netlib 0.12.0 stable in Ubuntu 18.04, but when I get to running $ make -j4 I get a lot of errors, such as: error: ‘SSL_R_SHORT_READ’ was not declared in this scope ERR_PACK(ERR_LIB_SSL, 0, SSL_R_SHORT_READ) Google…
Isaac Middlemiss
  • 208
  • 2
  • 4
  • 13
0
votes
0 answers

How to link multiple similar libraries at once in cmake

I am quite new to cmake and have a question what is the best way to achieve this: I need to link my code against three libraries from cpp-netlib: cppnetlib-uri cppnetlib-server-parsers cppnetlib-client-connections This is how my CMakeLists.txt…
Natjo
  • 2,005
  • 29
  • 75
0
votes
1 answer

cpp-netlib hello world example wont compile on linux

I tried to run the hello world example on cpp-netlib.org using cpp-netlib-0.12.0 and boost-1.64.0 on Ubuntu 16.04. A piece of the code is (from line 1): #include #include namespace http =…
0
votes
1 answer

Can cpp_netlib perform asynchronous concurrent requests?

cpp_netlib docs contains example HTTP client, but I see it works only in blocking mode: http_client::response response = client.get(request); -- this (as I guess) will stop program execution while waiting for server's response. Can I perform…
soulmare
  • 73
  • 1
  • 7
0
votes
1 answer

Building cpp-netlib with CMake

I've downloaded the cpp-netlib source, extracted it to a folder and for some reason I'm completely lost. I read the documentation carefully, it states I have to download CMake as well, which I did. Then I set the source directory and build…
Spook
  • 301
  • 4
  • 9
0
votes
1 answer

Boost Network Library not recognized on MAC OSX

So my current code I am trying to compile: #include int main() { boost::network::http::client client; boost::network::http::client::request request("http://www.example.com"); request <<…
bmc
  • 817
  • 1
  • 12
  • 23
0
votes
1 answer

C++ program crashes before main when run from Xcode (but OK from the command line)

The following program crashes before main is called when run from Xcode 6.3.2 on OS X 10.10.5 (Yosemite) in both debug mode and release mode. #include int main() { boost::network::uri::uri url; url <<…
ksl
  • 4,519
  • 11
  • 65
  • 106