Replaces the socket in a socket-stream, returning the existing socket object without closing it.
A socket object or
replace-socket-stream-socket replaces the socket in the socket-stream socket-stream, returning the existing socket object without closing it.
A socket object is normally a socket in the native operating system sense (an integer representing an
fd socket on Unix, and an integer representing
SOCKET on Microsoft Windows), but when using the Java interface it can also be a Java socket (jobject of class
socket-stream-socketand then using
(setf socket-stream-socket)to set the new one is different, because the
cl:setfwill close the old socket.
nilas the socket allows you to close the stream while retaining the socket.
LispWorks User Guide and Reference Manual - 13 Feb 2015