networking/TCPSocket.cpp
//=============================================================================
// Creates a platform-specific TCP socket
//=============================================================================
Creates a platform-specific TCP socket
Creates a platform - specific TCP socket
TCPSocket::TCPSocket() :
    Socket()
{
    socket_impl = SocketFactory::createTCPSocket();
    if (socket_impl)
    {
        Socket::setImplementation(socket_impl);
    }
    else
    {
        throw std::runtime_error(
            "Platform-specific TCP socket could not be created");
    }
}
TCPSocket :: TCPSocket ( ) : Socket ( ) { socket_impl = SocketFactory :: createTCPSocket ( ) ; if ( socket_impl ) { Socket :: setImplementation ( socket_impl ) ; } else { throw std :: runtime_error ( " " ) ; } }
Creates a platform-specific TCP socket
Creates a platform - specific TCP socket
// Get a platform-specific socket