Skip to content
DocsTry Aspire
DocsTry

IPortAllocator Methods

InterfaceMethods2 members
Provides port allocation functionality for resources.
AddUsedPort(int)Section titled AddUsedPort(int)abstract
Marks a port as used to prevent it from being allocated.
public interface IPortAllocator
{
public abstract void AddUsedPort(
int port)
{
// ...
}
}
portintThe port number to mark as used.
AllocatePortSection titled AllocatePortabstractint
Allocates a port that is not currently in use.
public interface IPortAllocator
{
public abstract int AllocatePort()
{
// ...
}
}
intAn available port number.