Nuria Framework - Network
Network module of the NuriaProject Framework
 All Classes Functions Typedefs Enumerations Enumerator
Public Types | Public Slots | Public Member Functions | List of all members
Nuria::HttpTransport Class Reference

Abstract data transport for HttpClient. More...

#include <httptransport.hpp>

Inheritance diagram for Nuria::HttpTransport:
Nuria::HttpTcpTransport

Public Types

enum  Type {
  Unknown = 0, TCP = 1, SSL = 2, Memory = 3,
  Custom = 4
}
 

Public Slots

virtual bool flush ()
 
virtual void forceClose ()
 

Public Member Functions

 HttpTransport (QObject *parent=0)
 
 ~HttpTransport ()
 
virtual Type type () const
 
virtual bool isSecure () const
 
virtual QHostAddress localAddress () const
 
virtual quint16 localPort () const
 
virtual QHostAddress peerAddress () const
 
virtual quint16 peerPort () const
 

Detailed Description

Abstract data transport for HttpClient.

A transport is responsible to receive and send to and from a HTTP client through a specific connection. The connection can be anything which can be represented as HttpTransport, e.g. TCP, SSL or a QBuffer (memory buffer).

Member Enumeration Documentation

Transport types.

Enumerator
Unknown 

Unkown transport, possibly a dummy.

TCP 

Connection using TCP.

SSL 

Connection using SSL over TCP.

Memory 

Using a in-memory buffer.

Custom 

Some other custom transport.

Constructor & Destructor Documentation

Nuria::HttpTransport::HttpTransport ( QObject *  parent = 0)
explicit

Constructor.

Nuria::HttpTransport::~HttpTransport ( )

Destructor.

Member Function Documentation

virtual bool Nuria::HttpTransport::flush ( )
virtualslot

Instructs the underlying transport to send any pending data to the client now. The default implementation always returns true.

virtual void Nuria::HttpTransport::forceClose ( )
virtualslot

Closes the underlying transport immediately, discarding any data in the send buffer (If one exists). The default implementation simply calls close().

virtual bool Nuria::HttpTransport::isSecure ( ) const
virtual

Returns true if the connection is somehow protected against external eavesdropping, e.g. through encryption. The default implementation returns false.

Reimplemented in Nuria::HttpTcpTransport.

virtual QHostAddress Nuria::HttpTransport::localAddress ( ) const
virtual

Returns the local address to which the peer is connected. The default implementation returns QHostAddress::Null.

Reimplemented in Nuria::HttpTcpTransport.

virtual quint16 Nuria::HttpTransport::localPort ( ) const
virtual

Returns the local port to which the peer is connected. The default implementation returns 0.

Reimplemented in Nuria::HttpTcpTransport.

virtual QHostAddress Nuria::HttpTransport::peerAddress ( ) const
virtual

Returns the address of the connected peer. The default implementation returns QHostAddress::Null.

Reimplemented in Nuria::HttpTcpTransport.

virtual quint16 Nuria::HttpTransport::peerPort ( ) const
virtual

Returns the port of the connected peer. The default implementation returns 0.

Reimplemented in Nuria::HttpTcpTransport.

virtual Type Nuria::HttpTransport::type ( ) const
virtual

Returns the type of the transport. The default implementation returns Custom.

Reimplemented in Nuria::HttpTcpTransport.


The documentation for this class was generated from the following file: