
Classes | |
| class | mrpt::utils::CClientTCPSocket |
| A TCP socket that can be connected to a TCP server, implementing MRPT's CStream interface for passing objects as well as generic read/write methods. More... | |
| class | mrpt::utils::CServerTCPSocket |
| A TCP socket that can be wait for client connections to enter. More... | |
Enumerations | |
| enum | mrpt::utils::net::ERRORCODE_HTTP { mrpt::utils::net::erOk = 0 , mrpt::utils::net::erBadURL , mrpt::utils::net::erCouldntConnect , mrpt::utils::net::erNotFound , mrpt::utils::net::erOtherHTTPError } |
| Possible returns from a HTTP request. More... | |
Functions | |
| ERRORCODE_HTTP BASE_IMPEXP | mrpt::utils::net::http_get (const string &url, vector_byte &out_content, string &out_errormsg, int port=80, const string &auth_user=string(), const string &auth_pass=string(), int *out_http_responsecode=NULL, mrpt::utils::TParameters< string > *extra_headers=NULL, mrpt::utils::TParameters< string > *out_headers=NULL, int timeout_ms=1000) |
| Perform an HTTP GET operation (version for retrieving the data as a vector_byte) More... | |
| ERRORCODE_HTTP BASE_IMPEXP | mrpt::utils::net::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=NULL, mrpt::utils::TParameters< string > *extra_headers=NULL, mrpt::utils::TParameters< string > *out_headers=NULL, int timeout_ms=1000) |
| Perform an HTTP GET operation (version for retrieving the data as text) More... | |
| bool BASE_IMPEXP | mrpt::utils::net::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 BASE_IMPEXP | mrpt::utils::net::getLastSocketErrorStr () |
| Returns a description of the last Sockets error. More... | |
Possible returns from a HTTP request.
| Enumerator | |
|---|---|
| erOk | |
| erBadURL | |
| erCouldntConnect | |
| erNotFound | |
| erOtherHTTPError | |
Definition at line 32 of file net_utils.h.
| bool BASE_IMPEXP mrpt::utils::net::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.
For example: server_name="www.google.com" -> out_ip="209.85.227.99"
| std::string BASE_IMPEXP mrpt::utils::net::getLastSocketErrorStr | ( | ) |
Returns a description of the last Sockets error.
Referenced by mrpt::utils::CClientTCPSocket::getLastErrorStr(), and mrpt::utils::CServerTCPSocket::getLastErrorStr().
| ERRORCODE_HTTP BASE_IMPEXP mrpt::utils::net::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 = NULL, |
||
| mrpt::utils::TParameters< string > * | extra_headers = NULL, |
||
| mrpt::utils::TParameters< string > * | out_headers = NULL, |
||
| int | timeout_ms = 1000 |
||
| ) |
Perform an HTTP GET operation (version for retrieving the data as text)
| url | Must be a simple string of the form "http://<servername>/<relative-address>". |
| port | The server port, if different from 80. |
| extra_headers | If provided, the given extra HTTP headers will be sent. |
| out_errormsg | On exit will contain a description of the error or "Ok". |
| out_content | The buffer with the retrieved data. |
| out_http_responsecode | If provided, will hold the HTTP code, eg: 200, 404... |
| out_headers | If provided, a copy of all the headers returned by the server will be saved here. |
| auth_user | Send a basic HTTP authorization request with the given user & password. |
| auth_pass | Send a basic HTTP authorization request with the given user & password. |
| ERRORCODE_HTTP BASE_IMPEXP mrpt::utils::net::http_get | ( | const string & | url, |
| vector_byte & | out_content, | ||
| string & | out_errormsg, | ||
| int | port = 80, |
||
| const string & | auth_user = string(), |
||
| const string & | auth_pass = string(), |
||
| int * | out_http_responsecode = NULL, |
||
| mrpt::utils::TParameters< string > * | extra_headers = NULL, |
||
| mrpt::utils::TParameters< string > * | out_headers = NULL, |
||
| int | timeout_ms = 1000 |
||
| ) |
Perform an HTTP GET operation (version for retrieving the data as a vector_byte)
| url | Must be a simple string of the form "http://<servername>/<relative-address>". |
| port | The server port, if different from 80. |
| extra_headers | If provided, the given extra HTTP headers will be sent. |
| out_errormsg | On exit will contain a description of the error or "Ok". |
| out_content | The buffer with the retrieved data. |
| out_http_responsecode | If provided, will hold the HTTP code, eg: 200, 404... |
| out_headers | If provided, a copy of all the headers returned by the server will be saved here. |
| auth_user | Send a basic HTTP authorization request with the given user & password. |
| auth_pass | Send a basic HTTP authorization request with the given user & password. |
| Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Fri Sep 3 01:11:30 UTC 2021 |