Ssl.Runtime_lockRuntime_lock is an equivalent, signature compatible, equivalent to the Ssl module, with one difference: the OCaml runtime lock isn't released before calling the underlying SSL primitives. Multiple systhreads cannot, therefore, run concurrently.
It works well with non blocking sockets where the usual semantics apply, i.e. handling of `EWOULDBLOCK`, `EGAIN`, etc. Additionally, the functions in this module don't perform a copy of application data buffers.
val connect : socket -> unitConnect an SSL socket.
val accept : socket -> unitAccept an SSL connection.
Open an SSL connection with the specified context.
val close_notify : socket -> boolSend close notify to the peer. This is SSL_shutdown(3). * returns true if shutdown is finished, false in case close_notify * needs to be called a second time.
val shutdown_connection : socket -> unitClose an SSL connection opened with open_connection.
val shutdown : socket -> unitClose a SSL connection. * Send close notify to the peer and wait for close notify from peer.
val flush : socket -> unitFlush an SSL connection.
val read : socket -> Stdlib.Bytes.t -> int -> int -> intread sock buf off len receives data from a connected SSL socket.
read_into_bigarray sock ba off len receives data from a connected SSL socket. This function releases the runtime while the read takes place.
val write : socket -> Stdlib.Bytes.t -> int -> int -> intwrite sock buf off len sends data over a connected SSL socket.
val write_substring : socket -> string -> int -> int -> intwrite_substring sock str off len sends data over a connected SSL socket.
write_bigarray sock ba off len sends data over a connected SSL socket. This function releases the runtime while the read takes place.
val input_string : socket -> stringInput a string on an SSL socket.
val output_string : socket -> string -> unitWrite a string on an SSL socket.
val input_char : socket -> charInput a character on an SSL socket.
val output_char : socket -> char -> unitWrite a char on an SSL socket.
val input_int : socket -> intInput an integer on an SSL socket.
val output_int : socket -> int -> unitWrite an integer on an SSL socket.