Protocols::Generics::TcpTransportFactory Class Reference

#include <TcpTransportFactory.h> [code]

Inherits Protocols::Generics::TransportFactory, and Protocols::Generics::TransportStatus.

Inheritance diagram for Protocols::Generics::TcpTransportFactory:

Inheritance graph
[legend]
Collaboration diagram for Protocols::Generics::TcpTransportFactory:

Collaboration graph
[legend]
List of all members.

Detailed Description

Todo:
Different protocols based on TCP will need different buffer sizes. For example, HTTP migth be fine with just 4K, however, Gnutella would need at least 64K. There should be a way to pass in the requested buffer size! Maybe we could use the query string of the TCP address URI, for example, tcp://host:port?r=4096&w=4096
Todo:
The implementation of this class so far does not care exactly what kind of Transport we are creating (well, TcpTransport is hardcoded now), so we could implement a registration mechanism like: registerTransportFactory (scheme, Callable <auto_ptr <Transport> (uri)>) Name resolution can be done in advance and name resolvers can be registered too.

Definition at line 48 of file TcpTransportFactory.h.

Public Member Functions

 TcpTransportFactory ()
 ~TcpTransportFactory ()
void createTransport (const Uri &, TransportFactoryStatus *)
void destroyTransport (Transport *)
void transportConnected (Transport *)
void transportReadyRead (Transport *)
void transportReadyWrite (Transport *)
void transportDisconnected (Transport *)

Private Types

typedef QHash< Transport *,
EstablishingTransport * > 
EstablishingTransports
typedef QSet< Transport * > Transports

Private Attributes

EstablishingTransports establishingTransports
Transports transports

Classes

struct  EstablishingTransport


Member Typedef Documentation

typedef QHash<Transport *, EstablishingTransport *> Protocols::Generics::TcpTransportFactory::EstablishingTransports [private]
 

Definition at line 73 of file TcpTransportFactory.h.

typedef QSet<Transport *> Protocols::Generics::TcpTransportFactory::Transports [private]
 

Definition at line 74 of file TcpTransportFactory.h.


Constructor & Destructor Documentation

TcpTransportFactory::TcpTransportFactory  ) 
 

Definition at line 57 of file TcpTransportFactory.cpp.

TcpTransportFactory::~TcpTransportFactory  ) 
 

Definition at line 62 of file TcpTransportFactory.cpp.


Member Function Documentation

void TcpTransportFactory::createTransport const Uri ,
TransportFactoryStatus
[virtual]
 

Implements Protocols::Generics::TransportFactory.

Definition at line 76 of file TcpTransportFactory.cpp.

void TcpTransportFactory::destroyTransport Transport  )  [virtual]
 

Implements Protocols::Generics::TransportFactory.

Definition at line 99 of file TcpTransportFactory.cpp.

void TcpTransportFactory::transportConnected Transport  )  [virtual]
 

Implements Protocols::Generics::TransportStatus.

Definition at line 106 of file TcpTransportFactory.cpp.

void TcpTransportFactory::transportDisconnected Transport  )  [virtual]
 

Implements Protocols::Generics::TransportStatus.

Definition at line 130 of file TcpTransportFactory.cpp.

void TcpTransportFactory::transportReadyRead Transport  )  [virtual]
 

Implements Protocols::Generics::TransportStatus.

Definition at line 120 of file TcpTransportFactory.cpp.

void TcpTransportFactory::transportReadyWrite Transport  )  [virtual]
 

Implements Protocols::Generics::TransportStatus.

Definition at line 125 of file TcpTransportFactory.cpp.


Member Data Documentation

EstablishingTransports Protocols::Generics::TcpTransportFactory::establishingTransports [private]
 

Definition at line 76 of file TcpTransportFactory.h.

Transports Protocols::Generics::TcpTransportFactory::transports [private]
 

Definition at line 77 of file TcpTransportFactory.h.


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