connectionlist FindConnectionByLocalPort method
Return to Introduction  Previous page  Next page
Applies to
acConnectionList component.  

Declaration
function FindConnectionByLocalPort(LocalPort: Word; Proto: TacConnectionProto = pAny;  
  ListeningPortOnly: Boolean = False): TacConnection;  

Description
The FindConnectionByLocalPort method searches for the connection where the local port is the same as specified in LocalPort parameter and protocol is the same as specified in Proto parameter (or returns any connection, either TCP or UDP, if Proto is pAny). Also it can search for connection which where the LocalPort is listening port, if ListeningPortOnly parameter is True.  
 
Function returns pointer to TacConnection object if the connection was found in the internal list of component, or nil if the connection with specified LocalPort not found.  

See also
FindConnectionByRemotePort, FindConnectionByLocalIPStr, FindConnectionByRemoteIPStr,  
FindLocalIPStrByLocalPort, FindLocalIPStrByRemotePort, FindRemoteIPStrByLocalPort and FindRemoteIPStrByRemotePort methods.