From 957e7a87448efbff54275b2d06248c417b94606d Mon Sep 17 00:00:00 2001 From: Spiros Eliopoulos Date: Sat, 20 Apr 2019 13:40:55 +0000 Subject: [PATCH] add-server: use bigstringaf for bigstring type --- lib/server_connection.mli | 8 ++++---- lib/server_handshake.mli | 6 +++--- lib/server_websocket.mli | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/server_connection.mli b/lib/server_connection.mli index 6161bad..5097e55 100644 --- a/lib/server_connection.mli +++ b/lib/server_connection.mli @@ -36,7 +36,7 @@ module IOVec = Httpaf.IOVec type 'handle t type input_handlers = - { frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstring.t -> off:int -> len:int -> unit + { frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstringaf.t -> off:int -> len:int -> unit ; eof : unit -> unit } val create @@ -45,10 +45,10 @@ val create -> 'handle t val next_read_operation : _ t -> [ `Read | `Yield | `Close ] -val next_write_operation : _ t -> [ `Write of Bigstring.t IOVec.t list | `Yield | `Close of int ] +val next_write_operation : _ t -> [ `Write of Bigstringaf.t IOVec.t list | `Yield | `Close of int ] -val read : _ t -> Bigstring.t -> off:int -> len:int -> int -val read_eof : _ t -> Bigstring.t -> off:int -> len:int -> int +val read : _ t -> Bigstringaf.t -> off:int -> len:int -> int +val read_eof : _ t -> Bigstringaf.t -> off:int -> len:int -> int val report_write_result : _ t -> [`Ok of int | `Closed ] -> unit val yield_reader : _ t -> (unit -> unit) -> unit diff --git a/lib/server_handshake.mli b/lib/server_handshake.mli index 1f3f549..53ca89b 100644 --- a/lib/server_handshake.mli +++ b/lib/server_handshake.mli @@ -40,10 +40,10 @@ val create -> 'handle t val next_read_operation : _ t -> [ `Read | `Close | `Yield ] -val next_write_operation : _ t -> [ `Write of Bigstring.t IOVec.t list | `Yield | `Close of int ] +val next_write_operation : _ t -> [ `Write of Bigstringaf.t IOVec.t list | `Yield | `Close of int ] -val read : _ t -> Bigstring.t -> off:int -> len:int -> int -val read_eof : _ t -> Bigstring.t -> off:int -> len:int -> int +val read : _ t -> Bigstringaf.t -> off:int -> len:int -> int +val read_eof : _ t -> Bigstringaf.t -> off:int -> len:int -> int val report_write_result : _ t -> [`Ok of int | `Closed ] -> unit val yield_reader : _ t -> (unit -> unit) -> unit diff --git a/lib/server_websocket.mli b/lib/server_websocket.mli index 1764942..cdcaae3 100644 --- a/lib/server_websocket.mli +++ b/lib/server_websocket.mli @@ -36,18 +36,18 @@ module IOVec = Httpaf.IOVec type t type input_handlers = - { frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstring.t -> off:int -> len:int -> unit - ; eof : unit -> unit } + { frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstringaf.t -> off:int -> len:int -> unit + ; eof : unit -> unit } val create : websocket_handler : (Wsd.t -> input_handlers) -> t val next_read_operation : t -> [ `Read | `Close ] -val next_write_operation : t -> [ `Write of Bigstring.t IOVec.t list | `Yield | `Close of int ] +val next_write_operation : t -> [ `Write of Bigstringaf.t IOVec.t list | `Yield | `Close of int ] -val read : t -> Bigstring.t -> off:int -> len:int -> int -val read_eof : t -> Bigstring.t -> off:int -> len:int -> int +val read : t -> Bigstringaf.t -> off:int -> len:int -> int +val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int val report_write_result : t -> [`Ok of int | `Closed ] -> unit val yield_writer : t -> (unit -> unit) -> unit