Docs GODI Archive
Projects Blog Link DB

Search GODI:


More options
File lib/ocaml/pkg-lib/equeue-ssl/ssl_exts.mli GODI Package godi-ocamlnet-ssl
Library equeue-ssl
 
   ssl_exts.cmi_pretty    ssl_exts.mli    Sources  
(* $Id: ssl_exts.mli 919 2006-06-15 12:32:17Z gerd $ *)

(** A few extensions to the ocaml-ssl library [Ssl] *)

exception Shutdown_error of Ssl.ssl_error

val get_shutdown : Ssl.socket -> bool * bool
  (** Returns a pair [ (shutdown_received, shutdown_sent) ]. The first bool
    * is true if a "close notify" alert from the remote peer has been
    * received by th. The second bool is true if a "close notify" alert has
    * been sent.
   *)

val get_rbio_eof : Ssl.socket -> bool
  (** Returns whether EOF has been read by the rbio *)

val single_shutdown : Ssl.socket -> unit
  (** Corresponds to SSL_shutdown: Closes one half of the SSL connection. 
   * If called for the first time, a "close notify" alert is sent to the
   * peer. If called for the second time, it is waited until the
   * peer's "close notify" alert arrives.
   *
   * Use [get_shutdown] to check what [single_shutdown] will do.
   *)

val single_read : Ssl.socket -> string -> int -> int -> int
  (** Corresponds to SSL_read; also support non-blocking descriptors *)


val single_write : Ssl.socket -> string -> int -> int -> int
  (** Corresponds to SSL_write; also support non-blocking descriptors *)


type ssl_mode =
    { enable_partial_write : bool;
      accept_moving_write_buffer : bool;
      auto_retry : bool;
    }

val get_mode : Ssl.socket -> ssl_mode
  (** Returns the current mode *)

val set_mode : Ssl.socket -> ssl_mode -> unit
  (** Sets additional mode bits. It is not possible to clear bits. *)


This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml