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

detach-ssl Function


Detaches the SSL from a socket stream.




detach-ssl socket-stream &key retry-count retry-timeout

A non-negative integer.
A non-negative real.

The function detach-ssl detaches the SSL from the socket-stream socket-stream. If socket-stream is not attached to an SSL, detach-ssl just returns immediately. Otherwise, it detaches the SSL from socket-stream, tries to shut down the SSL cleanly, and then frees the objects that were allocated by attach-ssl.

retry-count specifies how many additional times to call SSL_shutdown after the second to attempt to get a successful shutdown. The default value of retry-count is 5.

retry-timeout specifies the time in seconds to wait between each of the calls to SSL_shutdown. If it fails to get a successful shutdown after these attempts, detach-ssl signals an error. The default value of retry-timeout is 0.1.

Note that the shutdown calls happen after the SSL has been detached from socket-stream as far as LispWorks is concerned, so if an error occurs at this point and is aborted, socket-stream can be used in attach-ssl again (assuming that the peer can cope with this situation).

If retry-count is nil, detach-ssl does not try to get a successful shutdown call. This value is used when the stream is closed, but should not be used normally.

See also

25 TCP and UDP socket communication and SSL

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