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

NextPrevUpTopContentsIndex

async-io-state-handshake

Function
Summary

Perform a SSL handshake on an async-io-state.

Package

comm

Signature

async-io-state-handshake async-io-state callback &optional timeout

Arguments

async-io-state

A socket-stream.

callback

A function designator for a function with two arguments.

timeout

nil or a real.

Values

None.

Description

The function async-io-state-handshake performs a handshake on async-io-state, which must be attached to SSL.

When the handshake has finished successfully or failed, callback is called with two arguments: async-io-state and an error-indicator. The error-indicator is nil when successful, otherwise it is a list suitable for an error call as in (apply 'error error-indicator). The async-io-state-read-status of async-io-state is also set appropriately.

If the handshake does not finish in timeout seconds, callback is called with non-nil error-indicator: ("Handshake timed out"), and the async-io-state-read-status is set to :timeout. If the other side closes the socket cleanly, callback is called error-indicator: ("SSL connection closed"), and the async-io-state-read-status is set to :eof. Other cases indicate an actual error in the handshake.

async-io-state-handshake must not be called when there is any other operation on async-io-state and new operations on async-io-state must not be started until callback has been called.

Notes

If SSL was attached with ssl-side :both, then you will need to specify which side to take in the handshake by calling ssl-set-accept-state or ssl-set-connect-state with the ssl-pointer return by socket-stream-ssl.

See also

async-io-state
Using SSL


LispWorks User Guide and Reference Manual - 20 Sep 2017

NextPrevUpTopContentsIndex