Handbook
Glossary
port-protocol ( port -- protocol )
Vocabulary
io
.
sockets
Inputs
port
an
integer
Outputs
protocol
a protocol string or
f
Word description
Outputs the protocol associated with a port number, or
f
if the port number is unknown.
See also
protocol-port
Definition
USING:
accessors
kernel
unix.ffi
;
IN:
io.sockets
:
port-protocol
( port -- protocol )
[
htons
f
getservbyport
[
name>>
]
[
f
]
if*
]
[
f
]
if*
;