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