NetworkComms GetExistingConnection Method (EndPoint, EndPoint, ConnectionType, ApplicationLayerProtocolStatus)NetworkComms.Net Help
Returns a list of all connections matching the provided parameters.

Namespace: NetworkCommsDotNet
Assembly: NetworkCommsDotNet (in NetworkCommsDotNet.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax

public static List<Connection> GetExistingConnection(
	EndPoint remoteEndPoint,
	EndPoint localEndPoint,
	ConnectionType connectionType,
	ApplicationLayerProtocolStatus applicationLayerProtocol = ApplicationLayerProtocolStatus.Undefined
)

Parameters

remoteEndPoint
Type: OnlineSystem.Net EndPoint
Remote EndPoint corresponding with the desired connection. Use IPAddress.Any to match all IPAddresses. Use port number 0 to match all port numbers.
localEndPoint
Type: OnlineSystem.Net EndPoint
Local EndPoint corresponding with the desired connection. Use IPAddress.Any to match all IPAddresses. Use port number 0 to match all port numbers.
connectionType
Type: NetworkCommsDotNet.Connections ConnectionType
The ConnectionType desired. ConnectionType.Undefined matches all types.
applicationLayerProtocol (Optional)
Type: NetworkCommsDotNet.Connections ApplicationLayerProtocolStatus
Connections with matching ApplicationLayerProtocolStatus. Use ApplicationLayerProtocolStatus.Undefined to match all status types.

Return Value

Type: OnlineList Connection 
A list of connections to the desired peer. If no matching connections exists returns empty list.
See Also