From eb299736c1bcb277da1862afe95c11cb897effcf Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 22 Jan 2011 09:53:15 +0000 Subject: (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. --- src/network/core/tcp_http.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/network/core/tcp_http.cpp') 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 _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. */ -- cgit v1.2.3-54-g00ecf