PortFinderIsLocalPortAvailable Method |
Checks whether a particular local port is free.
Namespace: StreamCoders.HelpersAssembly: MediaBase (in MediaBase.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax public static bool IsLocalPortAvailable(
int portNumber,
ProtocolType protocolType
)
Public Shared Function IsLocalPortAvailable (
portNumber As Integer,
protocolType As ProtocolType
) As Boolean
public:
static bool IsLocalPortAvailable(
int portNumber,
ProtocolType protocolType
)
static member IsLocalPortAvailable :
portNumber : int *
protocolType : ProtocolType -> bool
Parameters
- portNumber
- Type: SystemInt32
Port number - protocolType
- Type: System.Net.SocketsProtocolType
Choose either Udp or Tcp
Return Value
Type:
BooleanReturns true if the given port is free, otherwise false.
See Also