InetSocketAddress

An IPv4 or IPv6 socket address; that is, the combination of a gio.InetAddress and a port number.

Constructors

this
this(GInetSocketAddress* gInetSocketAddress, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(InetAddress address, ushort port)

Creates a new gio.InetSocketAddress for address and port.

this
this(string address, uint port)

Creates a new gio.InetSocketAddress for address and port.

Members

Functions

getAddress
InetAddress getAddress()

Gets address's gio.InetAddress

getFlowinfo
uint getFlowinfo()

Gets the sin6_flowinfo field from address, which must be an IPv6 address.

getInetSocketAddressStruct
GInetSocketAddress* getInetSocketAddressStruct(bool transferOwnership)

Get the main Gtk struct

getPort
ushort getPort()

Gets address's port.

getScopeId
uint getScopeId()

Gets the sin6_scope_id field from address, which must be an IPv6 address.

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gInetSocketAddress
GInetSocketAddress* gInetSocketAddress;

the main Gtk struct

Inherited Members

From SocketAddress

gSocketAddress
GSocketAddress* gSocketAddress;

the main Gtk struct

getSocketAddressStruct
GSocketAddress* getSocketAddressStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getFamily
GSocketFamily getFamily()

Gets the socket family type of address.

getNativeSize
ptrdiff_t getNativeSize()

Gets the size of address's native struct sockaddr. You can use this to allocate memory to pass to Socket.addressToNative.

toNative
bool toNative(void* dest, size_t destlen)

Converts a gio.SocketAddress to a native struct sockaddr, which can be passed to low-level functions like connect() or bind().