Asynchronous SSL connections
Returns the socket state:
`Unset
: A fresh socket`Client
: A socket playing the SSL client role`Server
: A socket playing the SSL server role`Unclean
: The socket state is unclean. The socket is no longer usable.`Clean
: The SSL connection has been cleanly shut down.Whether the initial SSL handshake is in progress that makes this socket a client.
Whether the initial SSL handshake is in progress that makes this socket a server.
Makes the socket an SSL client socket by initiating the handshake.
The when_done
callback is invoked when the handshake is done.
One can neither read nor write before that.
Makes the socket an SSL server socket by initiating the handshake.
The when_done
callback is invoked when the handshake is done.
One can neither read nor write before that.
Inactivates the controller by deleting all event handlers. The file descriptor, however, is not closed. Normal users should not call this method.
The ssl_multiplex_controller
is an extended multiplex controller
which can also control SSL handshakes.
Important note: SSL/TLS does not support half-open connections. When one party closes the connection, the other party must immediately close the connection, too, throwing away any pending writes. See RFC 2246.
Creates a multiplex controller for an SSL socket. The descriptor must be a connected socket descriptor.
close_inactive_descr
: Whether to close the file descriptor by
inactivate
.
preclose
: This function is called immediately before closing
the descriptor
initial_state
: can be set to `Client
or `Server
if the context
is already established. Defaults to `Unset
timeout
: if set to (t, x)
, started operations time out after t
seconds and pass the exception x
back. A timeout is only indicated
when all started operations are inactive for t
seconds.
ssl_socket
: If passed, this socket is used instead of creating a
new one for the file descriptor. It is required that the descriptor
and the SSL context are connected with this SSL socket.
This engine performs the client handshake.
This engine performs the server handshake.