class TCPServerConnection

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


The abstract base class for TCP server connections created by TCPServer.

Derived classes must override the run() method (inherited from Runnable). Furthermore, a TCPServerConnectionFactory must be provided for the subclass.

The run() method must perform the complete handling of the client connection. As soon as the run() method returns, the server connection object is destroyed and the connection is automatically closed.

A new TCPServerConnection object will be created for each new client connection that is accepted by TCPServer.


Direct Base Classes: Poco::Runnable

All Base Classes: Poco::Runnable

Known Derived Classes: HTTPServerConnection

Member Summary

Member Functions: socket, start

Inherited Functions: run



    const StreamSocket & socket

Creates the TCPServerConnection using the given stream socket.


~TCPServerConnection virtual

virtual ~TCPServerConnection();

Destroys the TCPServerConnection.

Member Functions

socket protected inline

StreamSocket & socket();

Returns a reference to the underlying socket.

start protected

void start();

Calls run() and catches any exceptions that might be thrown by run().