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
| Attribute | Type | Description |
|---|---|---|
| port | int | The network port number used for the application, which must not be one of the restricted values defined in INVALID_APP_PORTS. |
| name | Optional[str] = null | An optional identifier or label assigned to the port for descriptive purposes. |
Constructor
Signature
def Port(
port: int,
name: Optional[str] = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| port | int | The port number to be assigned. |
| name | Optional[str] = None | An optional descriptive name for the port. |