File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ module Io =
28
28
| Ok s -> Some s
29
29
| Error (`Partial_eof _ ) -> None
30
30
31
- let write oc s =
31
+ let write oc strings =
32
32
Fiber. of_thunk (fun () ->
33
- Lio.Writer. add_string oc s ;
33
+ List. iter strings ~f: ( Lio.Writer. add_string oc) ;
34
34
Fiber. return () )
35
35
end )
36
36
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ end) (Chan : sig
50
50
51
51
val read_exactly : input -> int -> string option Io .t
52
52
53
- val write : output -> string -> unit Io .t
53
+ val write : output -> string list -> unit Io .t
54
54
end ) =
55
55
struct
56
56
open Io.O
@@ -112,6 +112,5 @@ struct
112
112
let data = Json. to_string json in
113
113
let content_length = String. length data in
114
114
let header = Header. create ~content_length () in
115
- let * () = Chan. write chan (Header. to_string header) in
116
- Chan. write chan data
115
+ Chan. write chan [ Header. to_string header; data ]
117
116
end
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ end) (Chan : sig
23
23
24
24
val read_exactly : input -> int -> string option Io .t
25
25
26
- val write : output -> string -> unit Io .t
26
+ val write : output -> string list -> unit Io .t
27
27
end ) : sig
28
28
val read : Chan .input -> Jsonrpc.Packet .t option Io .t
29
29
You can’t perform that action at this time.
0 commit comments