File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,13 @@ let wait_write (fd, s) =
161
161
Plain -> Lwt_unix. wait_write fd
162
162
| SSL _ -> Lwt_unix. yield ()
163
163
164
+ let close_notify (fd , s ) =
165
+ match s with
166
+ Plain ->
167
+ Lwt. fail_invalid_arg
168
+ " Lwt_ssl.close_notify: Expected SSL, but got Plain connection"
169
+ | SSL s -> repeat_call fd (fun () -> Ssl. close_notify s)
170
+
164
171
let ssl_shutdown (fd , s ) =
165
172
match s with
166
173
Plain -> Lwt. return_unit
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ val close : socket -> unit Lwt.t
74
74
val in_channel_of_descr : ?buffer : Lwt_bytes .t -> socket -> Lwt_io .input_channel
75
75
val out_channel_of_descr : ?buffer : Lwt_bytes .t -> socket -> Lwt_io .output_channel
76
76
77
+ val close_notify : socket -> int Lwt .t
77
78
val ssl_shutdown : socket -> unit Lwt .t
78
79
79
80
val abort : socket -> exn -> unit
You can’t perform that action at this time.
0 commit comments