It derives from <GObject>.
<GSocketAddress> is the equivalent of
‘struct sockaddr‘) and its subtypes in the BSD
sockets API. This is an abstract class; use
<GInetSocketAddress> for internet
sockets, or <GUnixSocketAddress> for
UNIX domain sockets.
parent-instanceThe family of the socket address.
Its value is a <GSocketFamily>.
It is read only.
Gets the socket family type of self.
Passed: a <GSocketAddress>.
Returned: a <GSocketFamily>.
the socket family type of self
Gets the size of self’s native struct sockaddr. You can use this
to allocate memory to pass to socket-address:to-native?.
Passed: a <GSocketAddress>.
Returned: a 64-bit integer.
the size of the native struct sockaddr that self represents, or
-1 if self is not valid
Creates a <GSocketAddress> subclass
corresponding to the native struct sockaddr native.
Passed: a foreign pointer, or a bytevector.
a pointer to a struct sockaddr
Passed: an unsigned 64-bit integer.
the size of the memory location pointed to by native
Returned: a <GSocketAddress>.
a new <GSocketAddress> if native could
successfully be converted, otherwise #f
Converts a <GSocketAddress> to a native
struct sockaddr, which can be passed to low-level functions like
connect() or bind().
If not enough space is available, a no-space
error is returned. If the address type is not known on the system then
a not-supported error is returned.
Passed: a <GSocketAddress>.
Passed: a foreign pointer, or a bytevector, or #f.
a pointer to a memory location that will contain the native struct sockaddr
Passed: an unsigned 64-bit integer.
the size of dest. Must be at least as large as
socket-address:get-native-size
Returned: a boolean.
#t if dest was filled in, #f on error
Gets the socket family type of self.
To override it in a new class, give register-type #:vfuncs
`((get-family . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GSocketAddress>, or a class that derives
from it, or its GType number.
Passed: a <GSocketAddress>.
Returned: a <GSocketFamily>.
the socket family type of self
Gets the size of self’s native struct sockaddr. You can use this
to allocate memory to pass to socket-address:to-native?.
To override it in a new class, give register-type #:vfuncs
`((get-native-size . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call:
<GSocketAddress>, or a class that derives
from it, or its GType number.
Passed: a <GSocketAddress>.
Returned: a 64-bit integer.
the size of the native struct sockaddr that self represents, or
-1 if self is not valid
Converts a <GSocketAddress> to a native
struct sockaddr, which can be passed to low-level functions like
connect() or bind().
If not enough space is available, a no-space
error is returned. If the address type is not known on the system then
a not-supported error is returned.
To override it in a new class, give register-type #:vfuncs
`((to-native . ,procedure)). The procedure is called as
(procedure self dest destlen) ⇒ %return.
Passed: the class whose implementation to call:
<GSocketAddress>, or a class that derives
from it, or its GType number.
Passed: a <GSocketAddress>.
Passed: a foreign pointer, or a bytevector, or #f.
a pointer to a memory location that will contain the native struct sockaddr
Passed: an unsigned 64-bit integer.
the size of dest. Must be at least as large as
socket-address:get-native-size
Returned: a boolean.
#t if dest was filled in, #f on error