Vault  4.1
Public Member Functions
VSocketFactory Class Reference

VSocketFactory can be used as-is, or can be subclassed to create special kinds of sockets; normally every socket is just a VSocket, but it is conceivable to have things like VSecureSocket or such. More...

#include <vsocketfactory.h>

List of all members.

Public Member Functions

 VSocketFactory ()
 Constructor, declared for completeness.
virtual ~VSocketFactory ()
 Destructor, declared for completeness.
virtual VSocketcreateSocket (VSocketID socketID)
 Creates a VSocket object and calls its init() method with the specified socket id.
virtual VSocketcreateSocket (const VString &hostName, int portNumber, const VSocketConnectionStrategy &connectionStrategy)
 Creates a VSocket object and calls its init() method with the specified host name, port number, and connection strategy.

Detailed Description

VSocketFactory can be used as-is, or can be subclassed to create special kinds of sockets; normally every socket is just a VSocket, but it is conceivable to have things like VSecureSocket or such.

Definition at line 24 of file vsocketfactory.h.


Member Function Documentation

VSocket * VSocketFactory::createSocket ( VSocketID  socketID) [virtual]

Creates a VSocket object and calls its init() method with the specified socket id.

Parameters:
socketIDthe socket id to pass to init()
Returns:
the new VSocket object

Definition at line 15 of file vsocketfactory.cpp.

References VSocket::discoverHostAndPort(), and VSocket::setDefaultSockOpt().

VSocket * VSocketFactory::createSocket ( const VString hostName,
int  portNumber,
const VSocketConnectionStrategy connectionStrategy 
) [virtual]

Creates a VSocket object and calls its init() method with the specified host name, port number, and connection strategy.

Parameters:
hostNamethe host name to pass to connectToHostName()
portNumberthe port number to pass to connectToHostName()
connectionStrategythe strategy object to pass to connectToHostName() (VSocketConnectionStrategySingle is simplest)
Returns:
the new VSocket object

Definition at line 23 of file vsocketfactory.cpp.

References VSocket::connectToHostName().


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

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.