usocket:get-local-port usocket:get-local-address usocket:get-local-name usocket:get-peer-address usocket:get-peer-port usocket:get-peer-name
(usocket:get-local-port socket) -- (usocket:get-local-address socket) -- (usocket:get-local-name socket) -- (usocket:get-peer-address socket) -- (usocket:get-peer-port socket) -- (usocket:get-peer-name socket)
The usocket address accessors, over the
rontolisp:tcp-local-port /
tcp-local-address / tcp-peer-address / tcp-peer-port
built-ins. The get-local-* accessors work on listeners and connected sockets
(reading an ephemeral port back after listening on usocket:*auto-port* is
the main use); the get-peer-* accessors work on connected sockets only.
get-local-name / get-peer-name return (values address port): a
multiple-value-bind receives both parts, and an ordinary single-value
context receives the address.
Backend support
- Interpreter and JVM: full support.
- WASM: component mode only;
get-local-portworks, the address and peer accessors returnnil(not wired through the sockets adapter). Preview 1 is a compile error. - Browser playground: not supported.