A http client.
More...
#include <libppbase/base_http/HTTPClient.h>
List of all members.
Detailed Description
A http client.
- Author:
- Christoph Schwarz
- Version:
- $Id: HTTPClient.h 21 2010-09-05 04:18:17Z cschwarz1 $
Constructor & Destructor Documentation
Constructor.
- Parameters:
-
| sock | the tcp socket to the server |
| addr | the server's name and port number |
Member Function Documentation
Creates a mime boundary.
- Returns:
- the mime boundary
int base_http::HTTPClient::read |
( |
base::String & |
rbuf |
) |
[protected] |
Reads some bytes from the remote end.
- Parameters:
-
| rbuf | buffer that returns the read data |
- Returns:
- -1=protocol error, 0=EOF, 1=success
void base_http::HTTPClient::readBody |
( |
HTTPRequest * |
ret |
) |
[protected] |
Reads the http body.
- Parameters:
-
| ret | the http request or response to read the body |
int base_http::HTTPClient::readChar |
( |
char * |
ch |
) |
[protected] |
Reads one byte from the remote end.
- Parameters:
-
- Returns:
- -1=protocol error, 0=EOF, 1=success
Reads the http header.
- Parameters:
-
| request | the corresponding request |
- Returns:
- a new http response object
void base_http::HTTPClient::readHeaders |
( |
HTTPRequest * |
request |
) |
[protected] |
Reads the http or mime headers.
- Parameters:
-
| request | the current http request |
Sends a http request to the server and get a response back.
- Parameters:
-
| request | the request to send |
- Returns:
- the response, caller must delete it
Sets the socket to the server.
- Parameters:
-
| sock | the socket to the server |
| addr | host name [and port number] of the server |
The documentation for this class was generated from the following file: