![]() |
Vault
4.1
|
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>
Public Member Functions | |
VSocketFactory () | |
Constructor, declared for completeness. | |
virtual | ~VSocketFactory () |
Destructor, declared for completeness. | |
virtual VSocket * | createSocket (VSocketID socketID) |
Creates a VSocket object and calls its init() method with the specified socket id. | |
virtual VSocket * | createSocket (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. |
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.
Creates a VSocket object and calls its init() method with the specified socket id.
socketID | the socket id to pass to init() |
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.
hostName | the host name to pass to connectToHostName() |
portNumber | the port number to pass to connectToHostName() |
connectionStrategy | the strategy object to pass to connectToHostName() (VSocketConnectionStrategySingle is simplest) |
Definition at line 23 of file vsocketfactory.cpp.
References VSocket::connectToHostName().