Class Poco::Net::TCPServerConnectionFactory (original) (raw)

Library: Net
Package: TCPServer
Header: Poco/Net/TCPServerConnectionFactory.h

Description

Inheritance

Known Derived Classes: HTTPServerConnectionFactory, TCPServerConnectionFactoryImpl

Member Summary

Member Functions: createConnection, isStopped, operator =, stop

Types Aliases

Ptr

using Ptr = Poco::SharedPtr < TCPServerConnectionFactory >;

Constructors

TCPServerConnectionFactory

TCPServerConnectionFactory(
const TCPServerConnectionFactory & param476
) = delete;

TCPServerConnectionFactory

TCPServerConnectionFactory(
TCPServerConnectionFactory && param478
) = delete;

TCPServerConnectionFactory protected

TCPServerConnectionFactory();

Destructor

~TCPServerConnectionFactory virtual

virtual ~TCPServerConnectionFactory();

Member Functions

createConnection virtual

virtual TCPServerConnection * createConnection(
const StreamSocket & socket
) = 0;

Creates an instance of a subclass of TCPServerConnection, using the given StreamSocket. This function is allowed to return nullptr, in which case an accepted socket will be destroyed by the TCPServerDispatcher.

isStopped inline

bool isStopped() const;

Returns true if the factory was stopped, false otherwise.

operator =

TCPServerConnectionFactory & operator = (
const TCPServerConnectionFactory & param477
) = delete;

operator =

TCPServerConnectionFactory & operator = (
TCPServerConnectionFactory && param479
) = delete;

stop inline

void stop();

Stops the factory. Normally, this function is called by TCPServerDispatcher to indicate that the server is shutting down; the expected implementation behavior after this call is to return nullptr on all subsequent connection creation attempts.