Celartem::HttpConnection Class Reference

#include <cel_http.h>

Inheritance diagram for Celartem::HttpConnection:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual AutoPtr
< HttpRequestStream
createRequestStream (const String &inMethod, const String &inRequest, bool inReqIsEscaped=false, CredentialProvider *inCredProv=NULL)=0
virtual AutoPtr< HttpManagergetHttpManager ()=0
virtual String getHostName () const =0
virtual u16 getPort () const =0
virtual bool isOnSSL () const =0


Detailed Description

HttpConnection takes care of information about a connection and controls the actual connection between the local host and the remote host. The instances of this class is created by HttpManager::createConnection .
See also:
HttpManager, HttpRequestStream, HttpResponseStream

Definition at line 269 of file cel_http.h.


Member Function Documentation

virtual AutoPtr<HttpRequestStream> Celartem::HttpConnection::createRequestStream ( const String inMethod,
const String inRequest,
bool  inReqIsEscaped = false,
CredentialProvider inCredProv = NULL 
) [pure virtual]

This method create a new HTTP request.
With a HttpConnection, only one instance of the HttpRequestStream can exist at a time; if you try to create several HttpRequestStream instances, they are serialized.

Parameters:
inMethod It specifies the HTTP method. It should be one of the following methods:
  • "GET" only to get content on the server, no data should be sent to the server.
  • "POST" You can send some data to the server before getting the server content.
  • "HEAD" to gather information about the resource.
inRequest URL without scheme, hostname, port specification, such as "/foo/bar.cgi?a=123&b=567". If you only have URL and want to extract the request part from it, use Url::separateUrl .
inReqIsEscaped Specifies whether the request is URL escaped or not. The default is false.
inCredProv Specifies a CredentialProvider instance which provides the information for authenticaion.
Returns:
Pointer to the newly created HttpRequestStream instance.
See also:
Url, HttpRequestStream

virtual AutoPtr<HttpManager> Celartem::HttpConnection::getHttpManager (  )  [pure virtual]

This method is to get the HttpManager instance that manages this HttpConnection instance.

Returns:
Pointer to the HttpManager instance.
See also:
HttpManager

virtual String Celartem::HttpConnection::getHostName (  )  const [pure virtual]

This method returns the host name of the connected peer.

Returns:
The host name of the host connected to.

virtual u16 Celartem::HttpConnection::getPort (  )  const [pure virtual]

This method returns the port of the connected peer.

Returns:
The port connected to.

virtual bool Celartem::HttpConnection::isOnSSL (  )  const [pure virtual]

This method returns whether this request is on the SSL connection or not.

Returns:
true if on the SSL connection, otherwise false.


The documentation for this class was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:17 2008.