Handbook
Glossary
sockaddr-of-family ( alien af -- sockaddr )
Vocabulary
io
.
sockets
.
private
Inputs
alien
an
object
af
an
object
Outputs
sockaddr
an
object
Definition
USING:
system
;
IN:
io.sockets.private
HOOK:
sockaddr-of-family
os
( alien af -- sockaddr )
Methods
USING:
classes.struct
combinators
io.sockets.private
kernel
system
unix.ffi
;
M:
unix
sockaddr-of-family
{
{
AF_INET
[
sockaddr-in
memory>struct
]
}
{
AF_INET6
[
sockaddr-in6
memory>struct
]
}
{
AF_UNIX
[
sockaddr-un
memory>struct
]
}
[
2drop
f
]
}
case
;