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

close-socket-handle Function

Summary

Closes a socket handle.

Package

comm

Signature

close-socket-handle socket-handle

Arguments
socket-handle
A socket handle.
Description

The function close-socket-handle closes socket-handle, thus releasing all OS resources that are associated with it. After socket-handle has been closed, it cannot be used anymore. close-socket-handle can also be called with a Java socket, that is a lw-ji:jobject of Java class java.net.Socket, and closes it using the Java method.

Notes

In typical usage, you do not need to call close-socket-handle, because the socket handle is stored in a socket connection object (socket-stream or async-io-state) and is closed automatically when the socket connection object is closed (by close for socket-stream and close-async-io-state for async-io-state).

See also

socket-stream
async-io-state
close-async-io-state


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