InetSocketAddress
Superclasses: SocketAddress
, Object
Subclasses: ProxyAddress
Implemented Interfaces: SocketConnectable
- Constructors:
InetSocketAddress(**properties)
new(address:Gio.InetAddress, port:int) -> Gio.SocketAddress
new_from_string(address:str, port:int) -> Gio.SocketAddress or None
Constructors
- class InetSocketAddress
- classmethod new(address: InetAddress, port: int) SocketAddress
Creates a new
InetSocketAddress
foraddress
andport
.Added in version 2.22.
- Parameters:
address – a
InetAddress
port – a port number
- classmethod new_from_string(address: str, port: int) SocketAddress | None
Creates a new
InetSocketAddress
foraddress
andport
.If
address
is an IPv6 address, it can also contain a scope ID (separated from the address by a%
).Added in version 2.40.
- Parameters:
address – the string form of an IP address
port – a port number
Methods
- class InetSocketAddress
- get_address() InetAddress
Gets
address
’sInetAddress
.Added in version 2.22.
Properties
- class InetSocketAddress
- props.address: InetAddress
The address.
Added in version 2.22.