Skip to main content

Port

This class represents a network port configuration, consisting of a port number and an optional name. It ensures data integrity by validating the port number against a list of restricted application ports during initialization.

Attributes

AttributeTypeDescription
portintThe network port number used for the application, which must not be one of the restricted values defined in INVALID_APP_PORTS.
nameOptional[str] = nullAn optional identifier or label assigned to the port for descriptive purposes.

Constructor

Signature

def Port(
port: int,
name: Optional[str] = None
) - > null

Parameters

NameTypeDescription
portintThe port number to be assigned.
nameOptional[str] = NoneAn optional descriptive name for the port.