|
OpenTTD Source
1.11.0-beta2
|
Connect with a HTTP server and do ONE query. More...
#include <tcp_http.h>
Public Member Functions | |
| NetworkHTTPContentConnecter (const NetworkAddress &address, HTTPCallback *callback, const char *url, const char *data=nullptr, int depth=0) | |
| Start the connecting. More... | |
| ~NetworkHTTPContentConnecter () | |
| Free all our allocated data. | |
| void | OnFailure () override |
| Callback for when the connection attempt failed. | |
| void | OnConnect (SOCKET s) override |
| Callback when the connection succeeded. More... | |
Private Attributes | |
| HTTPCallback * | callback |
| Callback to tell that we received some data (or won't). | |
| const char * | url |
| The URL we want to get at the server. | |
| const char * | data |
| The data to send. | |
| int | depth |
| How far we have recursed. | |
Private Attributes inherited from TCPConnecter | |
| NetworkAddress | address |
| Address we're connecting to. | |
Additional Inherited Members | |
Private Member Functions inherited from TCPConnecter | |
| TCPConnecter (const NetworkAddress &address) | |
| Create a new connecter for the given address. More... | |
| virtual | ~TCPConnecter () |
| Silence the warnings. | |
Static Private Member Functions inherited from TCPConnecter | |
| static void | CheckCallbacks () |
| Check whether we need to call the callback, i.e. More... | |
| static void | KillAll () |
| Kill all connection attempts. | |
Connect with a HTTP server and do ONE query.
Definition at line 75 of file tcp_http.h.
|
inline |
Start the connecting.
| address | the address to connect to |
| callback | the callback for HTTP retrieval |
| url | the url at the server |
| data | the data to send |
| depth | the depth (redirect recursion) of the queries |
Definition at line 90 of file tcp_http.h.
|
inlineoverridevirtual |
Callback when the connection succeeded.
| s | the socket that we opened |
Reimplemented from TCPConnecter.
Definition at line 113 of file tcp_http.h.
References TCPConnecter::address, and NetworkAddress::GetHostname().