Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/SocketFactory.h
SocketFactory is used by the ConnectionManager to create a socket for the connection to the listener on the server.
The default implementation simply creates a Poco::Net::StreamSocket. If a secure connection should be created, createSocket() should be overridden in a subclass, creating a Poco::Net::SecureStreamSocket instead.
The Remoting NG TCP transport uses the "remoting.tcp" URI scheme for unencrypted socket connections and the "remoting.tcps" URI scheme for SSL/TLS connections. Subclasses supporting SSL/TLS should check the URI scheme and create an appropriate socket.
Direct Base Classes: Poco::RefCountedObject
All Base Classes: Poco::RefCountedObject
Member Functions: createSocket
Inherited Functions: duplicate, referenceCount, release
typedef Poco::AutoPtr < SocketFactory > Ptr;
Creates the SocketFactory.
~SocketFactory();
Destroys the SocketFactory.
virtual Poco::Net::StreamSocket createSocket(
const Poco::URI & uri
);
Create and return a Poco::Net::StreamSocket (or subclass of it, such as a Poco::Net::SecureStreamSocket), connected to the address given by the authority part of the URI.
The default implementation simply creates a Poco::Net::StreamSocket.