All Manuals > LispWorks® User Guide and Reference Manual > 32 The COMM Package

get-socket-peer-address Function

Summary

Returns the remote address and port number of a given socket.

Package

comm

Signature

get-socket-peer-address socket => address, port

Arguments
socket
A socket handle.
Values
address
A integer, ipv6-address or nil.
port
An integer or nil.
Description

The function get-socket-peer-address returns the remote address of a connected socket socket.

address is the remote host address of socket or nil if not connected.

port is the remote port number of socket or nil if not connected.

Notes

Connected sockets have two addresses, local and remote.

See also

get-socket-address
socket-stream-peer-address
25 TCP and UDP socket communication and SSL


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26