Change to TIdMappedPortTCP

I needed more flexibility in TIdMappedPortTCP so I altered the file to allow

 - using cached connections for clients that connect
   currently done via events, if anyone is interested I might write
   a TIdConnectionCache component or something similar

I added and implemented the following events:

property OnGetCachedConnection: TCachedConnectionEvent
  read FGetCachedConnection
  write FGetCachedConnection;

property OnReleaseCachedConnection: TCachedConnectionEvent
  read FReleaseCachedConnection
  write FReleaseCachedConnection;

Instead of using TIdTCPClient in TIdMappedPortTCPData I am now using
TIdTCPConnection, to be more flexible in my connection cache.
If no cached connection is given, or the event is unassigned, then the default
behaviour applies and a TIdTCPClient is created and connected to the Master.

Maybe this will be of interest to someone, so I'm publishing it, posted to the
.attachments group is a new IdMappedPortTCP.pas file.

note: based on Indy 8.0.22 (not sure if its the same as 23?)

Please reply in this newsgroup only
 - SIP solutions -