PortAllocator Methods
Class Methods 2 members
Allocates and manages a range of ports for use in an application context.
AddUsedPort(int) Section titled AddUsedPort(int) Marks a port as used to prevent it from being allocated.
public sealed class PortAllocator{ public void AddUsedPort( int port) { // ... }}Parameters
port int The port number to mark as used. Allocates a port that is not currently in use.
public sealed class PortAllocator{ public int AllocatePort() { // ... }}Returns
int An available port number.