Indy 9
|
TIdMappedPortUDP = class(TIdUDPServer)
property MappedHost: string;
property OnRequest: TNotifyEvent;
OnRequest is triggered in DoUDPRead prior to establishing the surrogate connection to a remote system for the local UDP client.
constructor Create(AOwner: TComponent); override;
procedure DoUDPRead(AData: TStream; ABinding: TIdSocketHandle); override;
DoUDPRead calls the inhertied DoUDPRead method, and generates the OnRequest event notification for the connection. DoUDPRead creates a private TIdUDPClient instance that acts as a surrogate connection to the remote system identified in MappedHost and MappedPort. DoUDPRead attempts to read all of the remaining contents in AData, transmit the data, and read any response from the remote system. If a response is received, the value is send to peer connection in ABinding.