Class ListenerPortExtensions
int[] extensions, which in this case is an array of ports
Inheritance
System.Object
ListenerPortExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dapplo.HttpExtensions.Listener
Assembly: Dapplo.HttpExtensions.dll
Syntax
public static class ListenerPortExtensions
Methods
| Improve this Doc View SourceCreateLocalHostUri(Int32[])
Create an Localhost Uri for an unused port
Declaration
public static Uri CreateLocalHostUri(this int[] possiblePorts)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | possiblePorts | An int array with ports, the routine will return the first free port. |
Returns
Type | Description |
---|---|
Uri | Uri |
GetFreeListenerPort(Int32[])
Returns an unused port. A port of 0 in the list will have the following behaviour: https://msdn.microsoft.com/en-us/library/c6z86e63.aspx If you do not care which local port is used, you can specify 0 for the port number. In this case, the service provider will assign an available port number between 1024 and 5000.
Declaration
public static int GetFreeListenerPort(this int[] possiblePorts)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | possiblePorts | An int array with ports, the routine will return the first free port. |
Returns
Type | Description |
---|---|
System.Int32 | A free port |