Module Socket.Make

Parameters

module T : Deferred.T

Signature

type 'a deferred = 'a T.t
type 'a t

An concurrent zeromq socket

type 'a of_socket_args = 'a
val of_socket : ('a Zmq.Socket.t -> 'a t) of_socket_args

of_socket s wraps the zeromq socket s

val to_socket : 'a t -> 'a Zmq.Socket.t

to_socket s extracts the raw zeromq socket from s

val recv : 'a t -> string deferred

recv socket waits for a message on socket without blocking other concurrent threads

val send : 'a t -> string -> unit deferred

send socket sends a message on socket without blocking other concurrent threads

val recv_all : 'a t -> string list deferred

recv_all socket waits for a multi-part message on socket without blocking other concurrent threads

val send_all : 'a t -> string list -> unit deferred

send_all socket m sends all parts of the multi-part message m on socket without blocking other concurrent threads

val recv_msg : 'a t -> Zmq.Msg.t deferred

recv_msg socket waits for a message on socket without blocking other concurrent threads

val send_msg : 'a t -> Zmq.Msg.t -> unit deferred

send_msg socket sends a message on socket without blocking other concurrent threads

val recv_msg_all : 'a t -> Zmq.Msg.t list deferred

recv_msg_all socket waits for a multi-part message on socket without blocking other concurrent threads

val send_msg_all : 'a t -> Zmq.Msg.t list -> unit deferred

send_msg_all socket m sends all parts of the multi-part message m on socket without blocking other concurrent threads

val close : 'a t -> unit deferred
module Router : sig ... end
module Monitor : sig ... end