diff options
author | rubidium <rubidium@openttd.org> | 2011-01-22 09:53:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-01-22 09:53:15 +0000 |
commit | eb299736c1bcb277da1862afe95c11cb897effcf (patch) | |
tree | 3bb6bff78f066da770a367e078c569dbe8ce319a /src/network/core/tcp_http.cpp | |
parent | 0cdb1c78cdbfce4d426441c21ef7066f1cfecf6f (diff) | |
download | openttd-eb299736c1bcb277da1862afe95c11cb897effcf.tar.xz |
(svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n].
Diffstat (limited to 'src/network/core/tcp_http.cpp')
-rw-r--r-- | src/network/core/tcp_http.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp index 5ad24cfb7..a29d6a56e 100644 --- a/src/network/core/tcp_http.cpp +++ b/src/network/core/tcp_http.cpp @@ -23,6 +23,14 @@ /** List of open HTTP connections. */ static SmallVector<NetworkHTTPSocketHandler *, 1> _http_connections; +/** + * Start the querying + * @param sock the socket of this connection + * @param callback the callback for HTTP retrieval + * @param url the url at the server + * @param data the data to send + * @param depth the depth (redirect recursion) of the queries + */ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s, HTTPCallback *callback, const char *host, const char *url, const char *data, int depth) : @@ -57,6 +65,7 @@ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s, *_http_connections.Append() = this; } +/** Free whatever needs to be freed. */ NetworkHTTPSocketHandler::~NetworkHTTPSocketHandler() { this->CloseConnection(); @@ -175,6 +184,13 @@ int NetworkHTTPSocketHandler::HandleHeader() return 0; } +/** + * Connect to the given URI. + * @param uri the URI to connect to. + * @param callback the callback to send data back on. + * @param data the data we want to send (as POST). + * @param depth the recursion/redirect depth. + */ /* static */ int NetworkHTTPSocketHandler::Connect(char *uri, HTTPCallback *callback, const char *data, int depth) { char *hname = strstr(uri, "://"); @@ -274,6 +290,9 @@ int NetworkHTTPSocketHandler::Receive() } } +/** + * Do the receiving for all HTTP connections. + */ /* static */ void NetworkHTTPSocketHandler::HTTPReceive() { /* No connections, just bail out. */ |