pynetdicom.transport.AddressInformation#
- class pynetdicom.transport.AddressInformation(addr: str, port: int, flowinfo: int = 0, scope_id: int = 0)[source]#
IPv4 or IPv6 address information.
Added in version 3.0.
- __init__(addr: str, port: int, flowinfo: int = 0, scope_id: int = 0) None[source]#
Create a new AddressInformation instance.
Methods
__init__(addr, port[, flowinfo, scope_id])Create a new AddressInformation instance.
from_addr_port(addr, port)Return the a new AddressInformation instance from addr and port
from_tuple(address_info)Return the a new AddressInformation instance from address_info
Attributes
Get or set the IP address.
Return the address family enum that the address belongs to.
Return the address information as
(address, port)or(address, port, flowinfo, scope_id).Return
Trueif the address belongs to the IPv4 family,Falseotherwise.Return
Trueif the address belongs to the IPv6 family,Falseotherwise.- property address_family: AddressFamily#
Return the address family enum that the address belongs to.
- property as_tuple: tuple[str, int] | tuple[str, int, int, int]#
Return the address information as
(address, port)or(address, port, flowinfo, scope_id).
- classmethod from_addr_port(addr: str | tuple[str, int, int], port: int) AddressInformation[source]#
Return the a new AddressInformation instance from addr and port