Module Procord_connection.Sync

module Sync: sig .. end
Synchronous interface to procord connections.


Synchronous interface to procord connections.

These functions can be mixed with the asynchronous ones. They wait until either their condition is met or until state returns Disconnected.
val connect : ?timeout:float ->
?ping:string -> string -> int -> 'a -> 'a Procord_connection.t
Same as connect, but wait until the connection is established.
val close_nicely : ?timeout:float -> 'a Procord_connection.t -> unit
Same as close_nicely, but wait until the connection is closed.
val send : 'a Procord_connection.t -> string -> unit
Same as send, but wait until the sending buffer is empty.
val receive : 'a Procord_connection.t -> int -> string option
Same as receive, but wait until the data is available.