Poco::RemotingNG::TCP

class SocketFactory

File Information

Library: RemotingNG/TCP
Package: TCP
Header: Poco/RemotingNG/TCP/SocketFactory.h

Description

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.

Inheritance

Direct Base Classes: Poco::RefCountedObject

All Base Classes: Poco::RefCountedObject

Member Summary

Member Functions: createSocket

Inherited Functions: duplicate, referenceCount, release

Types Aliases

Ptr

using Ptr = Poco::AutoPtr < SocketFactory >;

Constructors

SocketFactory

SocketFactory();

Creates the SocketFactory.

Destructor

~SocketFactory virtual

~SocketFactory();

Destroys the SocketFactory.

Member Functions

createSocket virtual

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.