Handbook
Glossary
(accept) ( server addrspec -- handle sockaddr )
Vocabulary
io
.
sockets
.
private
Inputs
server
an
object
addrspec
an
object
Outputs
handle
an
object
sockaddr
an
object
Definition
IN:
io.sockets.private
GENERIC:
(accept)
( server addrspec -- handle sockaddr )
Methods
USING:
combinators
io.backend.unix
io.files
io.ports
io.sockets.private
io.sockets.unix
kernel
libc
math
;
M:
object
(accept)
2dup
do-accept
over
0
>=
[
[
2nip
<fd>
init-fd
]
dip
]
[
errno
{
{
EINTR
[
2drop
(accept)
]
}
{
EAGAIN
[
2drop
[
drop
+input+
wait-for-port
]
[
(accept)
]
2bi
]
}
[
(throw-errno)
]
}
case
]
if
;
USING:
accessors
destructors
io.sockets.private
io.sockets.secure
io.sockets.secure.openssl
kernel
;
M:
secure
(accept)
[
addrspec>>
(accept)
[
|dispose
f
<ssl-socket>
]
dip
]
with-destructors
;