Internet Direct (Indy) Version 9.0.2 Beta
TIdPeerThread.Connection
Encapsulates server access within a thread.

property Connection: TIdTCPServerConnection;
Description
Connection is a read-only TIdTCPServerConnection property used to encapsulate access to the TCP server from within a thread. When the thread is executed, Connection provides the server context for the thread.

Requests for TIdPeerThreads are created by a TIdListenerThread, and are delegated to the TIdThreadMgr for the TCP server.

In TIdPeerThread, Connection is owned by the Connection.Server that is the end-point of the connection.

Connection can be used to access properties, methods, and events of the server, and to allow data transmission in a manner similar to a client connection. For example: