Module Tezt_tezos.Websocket

exception Could_not_connect
exception Connection_closed
type t

Type of a websocket client

val connect : ?runner:Tezt_wrapper.Runner.t -> ?hooks:Tezt_wrapper.Process_hooks.t -> ?name:string -> string -> t Lwt.t

connect ?runner ?hook ?name url connects to a websocket server and returns the client.

val close : t -> unit Lwt.t

Terminate the client.

val send : t -> Tezt_wrapper.JSON.t -> unit Lwt.t

Send a JSON object on the websocket.

val send_raw : t -> string -> unit Lwt.t

Send a raw string on the websocket.

val recv : t -> Tezt_wrapper.JSON.t Lwt.t

Receive a JSON object on the websocket.

val send_recv : t -> Tezt_wrapper.JSON.t -> Tezt_wrapper.JSON.t Lwt.t

Send and receive response on websocket.

val pause : t -> unit

Send SIGSTOP to websocket client process.

val resume : t -> unit

Send SIGCONT to websocket client process.