~ubuntu-branches/ubuntu/trusty/ocamlnet/trusty

« back to all changes in this revision

Viewing changes to src/equeue-ssl/uq_ssl.mli

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-09-02 14:12:33 UTC
  • mfrom: (18.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110902141233-zbj0ygxb92u6gy4z
Tags: 3.4-1
* New upstream release
  - add a new NetcgiRequire directive to ease dependency management
    (Closes: #637147)
  - remove patches that were applied upstream:
    + Added-missing-shebang-lines-in-example-shell-scripts
    + Try-also-ocamlc-for-POSIX-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* $Id: uq_ssl.mli 967 2006-07-26 21:38:43Z gerd $ *)
 
1
(* $Id: uq_ssl.mli 1607 2011-05-25 16:54:21Z gerd $ *)
2
2
 
3
3
(** Asynchronous SSL connections *)
4
4
 
6
6
  (** Used in [when_done] callbacks to indicate an SSL-specific error code *)
7
7
 
8
8
 
 
9
type ssl_socket_state =
 
10
    [ `Unset | `Client | `Server | `Unclean | `Clean ]
 
11
 
9
12
(** The [ssl_multiplex_controller] is an extended multiplex controller
10
13
  * which can also control SSL handshakes.
11
14
  *
20
23
 
21
24
  method ssl_socket : Ssl.socket
22
25
 
23
 
  method ssl_socket_state : [ `Unset | `Client | `Server | `Unclean | `Clean ]
 
26
  method ssl_socket_state : ssl_socket_state
24
27
    (** Returns the socket state:
25
28
      * - [`Unset]: A fresh socket
26
29
      * - [`Client]: A socket playing the SSL client role
76
79
 
77
80
val create_ssl_multiplex_controller : 
78
81
       ?close_inactive_descr:bool ->
 
82
       ?preclose:(unit -> unit) ->
 
83
       ?initial_state:ssl_socket_state ->
 
84
       ?timeout:(float * exn) ->
79
85
       Unix.file_descr -> Ssl.context -> Unixqueue.event_system ->
80
86
         ssl_multiplex_controller
81
87
  (** Creates a multiplex controller for an SSL socket. The descriptor must
83
89
    *
84
90
    * [close_inactive_descr]: Whether to close the file descriptor by
85
91
    * [inactivate].
 
92
    *
 
93
    * [preclose]: This function is called immediately before closing
 
94
    * the descriptor
 
95
    *
 
96
    * [initial_state]: can be set to [`Client] or [`Server] if the context
 
97
    * is already established. Defaults to [`Unset]
 
98
    *
 
99
    * [timeout]: if set to [(t, x)], started operations time out after [t]
 
100
    * seconds and pass the exception [x] back. A timeout is only indicated
 
101
    * when all started operations are inactive for [t] seconds.
86
102
   *)
87
103
 
88
104
val ssl_connect_engine : 
92
108
val ssl_accept_engine : 
93
109
       ssl_multiplex_controller -> unit Uq_engines.engine
94
110
  (** This engine performs the server handshake. *)
 
111
 
 
112
 
 
113
 
 
114
(** {1 Debugging} *)
 
115
 
 
116
module Debug : sig
 
117
  val enable : bool ref
 
118
    (** Enables {!Netlog}-style debugging of this module *)
 
119
end