Internet Direct (Indy)
Home
PreviousUpNext
TIdMappedPortTCP.OnExecute Event

Event handler signalled to perform data handling for the local client in the proxied connection.

Pascal
property OnExecute: TIdServerThreadEvent;

OnExecute is a TIdMappedPortContextEvent property that represents the event handler signalled to perform data handling for the local client in the proxied connection. 

OnExecute is used in the protected method that controls execution of the Contexts allocated for the server. 

Prior to triggering the OnExecute event handler, the ReadList for the proxied session is is used to determine is data is available on the local or remote connections. 

When data is available from the local client connection, the values are stored in the NetData property for the TIdMappedPortContext for use in the OnExecute event handler. 

Applications must assign a procedure to the OnExecute event handler to allow responding to the event notification. Values in the NetData property for the ContextClass can be modified or removed in OnExecute by setting NetData to an empty string (''). 

Following execution of the OnExecute event handler, the OnOutboundData event handler is signalled and non-blank values in the NetData property for the ContextClass instance are written to the remote connection. 

When data is available from the remote connection, the values are stored in the NetData property for the TIdMappedPortContext for use in the OnOutboundData event handler. 

Following execution of the OnOutboundData event handler, non-blank values in the NetData property for the ContextClass instance are written to the local client connection. 

If the remote connection for the proxied session has been closed, both the OnOutboundDisconnect and OnDisconnect event handlers are signalled and the local client connection is closed.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.