Click or drag to resize
PortFinderIsLocalPortAvailable Method
Checks whether a particular local port is free.

Namespace: StreamCoders.Helpers
Assembly: MediaBase (in MediaBase.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax
public static bool IsLocalPortAvailable(
	int portNumber,
	ProtocolType protocolType
)

Parameters

portNumber
Type: SystemInt32
Port number
protocolType
Type: System.Net.SocketsProtocolType
Choose either Udp or Tcp

Return Value

Type: Boolean
Returns true if the given port is free, otherwise false.
See Also