Vault  4.1
vsocketfactory.cpp
Go to the documentation of this file.
00001 /*
00002 Copyright c1997-2014 Trygve Isaacson. All rights reserved.
00003 This file is part of the Code Vault version 4.1
00004 http://www.bombaydigital.com/
00005 License: MIT. See LICENSE.md in the Vault top level directory.
00006 */
00007 
00010 #include "vsocketfactory.h"
00011 
00012 VSocketFactory::VSocketFactory() {
00013 }
00014 
00015 VSocket* VSocketFactory::createSocket(VSocketID socketID) {
00016     VSocket* theSocket = new VSocket(socketID);
00017     theSocket->discoverHostAndPort();
00018     theSocket->setDefaultSockOpt();
00019 
00020     return theSocket;
00021 }
00022 
00023 VSocket* VSocketFactory::createSocket(const VString& hostName, int portNumber, const VSocketConnectionStrategy& connectionStrategy) {
00024     VSocket* theSocket = new VSocket();
00025     theSocket->connectToHostName(hostName, portNumber, connectionStrategy);
00026 
00027     return theSocket;
00028 }
00029 

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