MRPT  2.0.1
Enumerations | Functions
mrpt::comms::net Namespace Reference

Detailed Description

A set of useful routines for networking.

(in #include <mrpt/comms/net_utils.h>)

Enumerations

enum  ERRORCODE_HTTP {
  erOk = 0, erBadURL, erCouldntConnect, erNotFound,
  erOtherHTTPError
}
 Possible returns from a HTTP request. More...
 

Functions

ERRORCODE_HTTP http_get (const string &url, std::vector< uint8_t > &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=nullptr, mrpt::system::TParameters< string > *extra_headers=nullptr, mrpt::system::TParameters< string > *out_headers=nullptr, int timeout_ms=1000)
 Perform an HTTP GET operation (version for retrieving the data as a std::vector<uint8_t>) More...
 
ERRORCODE_HTTP http_get (const string &url, string &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=nullptr, mrpt::system::TParameters< string > *extra_headers=nullptr, mrpt::system::TParameters< string > *out_headers=nullptr, int timeout_ms=1000)
 Perform an HTTP GET operation (version for retrieving the data as text) More...
 
ERRORCODE_HTTP http_request (const string &http_method, const string &http_send_content, const string &url, std::vector< uint8_t > &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=nullptr, mrpt::system::TParameters< string > *extra_headers=nullptr, mrpt::system::TParameters< string > *out_headers=nullptr, int timeout_ms=1000)
 Generic function for HTTP GET & POST methods. More...
 
bool DNS_resolve_async (const std::string &server_name, std::string &out_ip, const unsigned int timeout_ms=3000)
 Resolve a server address by its name, returning its IP address as a string - This method has a timeout for the maximum time to wait for the DNS server. More...
 
std::string getLastSocketErrorStr ()
 Returns a description of the last Sockets error. More...
 
bool Ping (const std::string &address, const int max_attempts, std::string *output_str=nullptr)
 Ping an IP address. More...
 



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020