Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Quorum::SocketBuilder Class Reference

Functional base class for constructing SocketBase objects based on predefined arguments. More...

#include <SocketBuilder.h>

Inheritance diagram for CODEX_Quorum::SocketBuilder:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SocketBuilder (int domain=PF_INET, int type=SOCK_STREAM, int protocol=0, bool blocking=false)
 Constructor for a SocketBuilder.
 SocketBuilder (const SocketBuilder &sb)
 Copy constructor.
virtual ~SocketBuilder ()
 Virtual destructor.
virtual SocketBaseoperator() () const
 Create a new SocketBase.

Protected Attributes

int m_domain
 Protocol domain for SocketBase.
int m_type
 Socket type for SocketBase.
int m_protocol
 Protocol for SocketBase.
bool m_blocking
 Blocking flag for SocketBase.

Detailed Description

Functional base class for constructing SocketBase objects based on predefined arguments.

This class and its descendants are used by RemoteServer (and its descendants) to open sockets which are then connected to remote servers. This allows arbitrary combinations of remote server and socket types, since the base class of each hierarchy only ever cares about the base class of the other hierarchy.

Definition at line 38 of file SocketBuilder.h.


Constructor & Destructor Documentation

CODEX_Quorum::SocketBuilder::SocketBuilder int  domain = PF_INET,
int  type = SOCK_STREAM,
int  protocol = 0,
bool  blocking = false
[inline]
 

Constructor for a SocketBuilder.

The arguments of the constructor are those arguments needed to create a corresponding socket object.

Parameters:
domain Protocol family. Defaults to PF_INET.
type Socket type. Defaults to SOCK_STREAM (TCP).
protocol Specific protocol. Defaults to 0, which is usually the only available value.
blocking Should the socket be able to block?
See also:
SocketBase::SocketBase

Definition at line 53 of file SocketBuilder.h.

References m_blocking, m_domain, m_protocol, and m_type.


Member Function Documentation

SocketBase * SocketBuilder::operator()  )  const [virtual]
 

Create a new SocketBase.

SocketBuilder is initialized with everything it needs to create a new socket. Binding to a specific port and address is not included, so a single SocketBuilder can be used to create all of the needed sockets of a given type.

Reimplemented in CODEX_Quorum::LoopbackSocketBuilder, and CODEX_SSL::SSLSocketBuilder.

Definition at line 24 of file SocketBuilder.cc.

References m_blocking, m_domain, m_protocol, and m_type.


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:42:36 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1