Module Zmq.Socket
val pair : [> `Pair ] kindval pub : [> `Pub ] kindval sub : [> `Sub ] kindval req : [> `Req ] kindval rep : [> `Rep ] kindval dealer : [> `Dealer ] kindval router : [> `Router ] kindval pull : [> `Pull ] kindval push : [> `Push ] kindval xsub : [> `Xsub ] kindval xpub : [> `Xpub ] kindval stream : [> `Stream ] kindval create : Context.t -> 'a kind -> 'a tCreation and Destruction
val disconnect : 'a t -> string -> unitval bind : 'a t -> string -> unitval unbind : 'a t -> string -> unitval recv : ?block:bool -> 'a t -> stringRead a message from the socket. block indicates if the call should be blocking or non-blocking. If block is
false,recvwill raiseUnix.Unix_error (Unix.EAGAIN, _, _)if there are no messages available to receive on the specified socket. Default true
val recv_all : ?block:bool -> 'a t -> string listRead a complete multipart message from the socket. block indicates if the call should be blocking or non-blocking. Default true
val send : ?block:bool -> ?more:bool -> 'a t -> string -> unitSend a message to the socket. block indicates if the call should be blocking or non-blocking. Default true more is used for multipart messages, and indicates that the more message parts will follow. Default false
val send_all : ?block:bool -> 'a t -> string list -> unitSend a multipart message to the socket. block indicates if the call should be blocking or non-blocking. Default true
val recv_msg : ?block:bool -> 'a t -> Msg.tReceive a
Msg.ton the socket.- parameter block
indicates if the call should be blocking or non-blocking. Defaults to
true.
val recv_msg_all : ?block:bool -> 'a t -> Msg.t listReceive a multi-part message on the socket.
- parameter block
indicates if the call should be blocking or non-blocking. Defaults to
true.
val send_msg : ?block:bool -> ?more:bool -> 'a t -> Msg.t -> unitSend a
Msg.tto the socket.- parameter block
indicates if the call should be blocking or non-blocking. Defaults to
true.
- parameter more
is used for multipart messages Set to
trueto indicate that more message parts will follow. Defaults tofalse.
val send_msg_all : ?block:bool -> 'a t -> Msg.t list -> unitSend a multi-part message to the socket.
- parameter block
indicates if the call should be blocking or non-blocking. Defaults to
true.
val set_max_message_size : 'a t -> int -> unitOption Getter and Setters
val get_max_message_size : 'a t -> intval set_affinity : 'a t -> int -> unitval get_affinity : 'a t -> intval set_identity : 'a t -> string -> unitval get_identity : 'a t -> stringval subscribe : [> `Sub ] t -> string -> unitval unsubscribe : [> `Sub ] t -> string -> unitval get_last_endpoint : 'a t -> stringval set_tcp_accept_filter : 'a t -> string -> unitval set_rate : 'a t -> int -> unitval get_rate : 'a t -> intval set_recovery_interval : 'a t -> int -> unitval get_recovery_interval : 'a t -> intval set_send_buffer_size : 'a t -> int -> unitval get_send_buffer_size : 'a t -> intval set_receive_buffer_size : 'a t -> int -> unitval get_receive_buffer_size : 'a t -> intval has_more : 'a t -> boolval set_linger_period : 'a t -> int -> unitval get_linger_period : 'a t -> intval set_reconnect_interval : 'a t -> int -> unitval get_reconnect_interval : 'a t -> intval set_connection_backlog : 'a t -> int -> unitval get_connection_backlog : 'a t -> intval set_reconnect_interval_max : 'a t -> int -> unitval get_reconnect_interval_max : 'a t -> intval set_send_high_water_mark : 'a t -> int -> unitval get_send_high_water_mark : 'a t -> intval set_receive_high_water_mark : 'a t -> int -> unitval get_receive_high_water_mark : 'a t -> intval set_multicast_hops : 'a t -> int -> unitval get_multicast_hops : 'a t -> intval set_receive_timeout : 'a t -> int -> unitval get_receive_timeout : 'a t -> intval set_send_timeout : 'a t -> int -> unitval get_send_timeout : 'a t -> intval set_ipv6 : 'a t -> bool -> unitval get_ipv6 : 'a t -> boolval set_router_mandatory : 'a t -> bool -> unitval get_router_mandatory : 'a t -> boolval set_tcp_keepalive : 'a t -> [ `Default | `Value of bool ] -> unitval get_tcp_keepalive : 'a t -> [ `Default | `Value of bool ]val set_tcp_keepalive_idle : 'a t -> [ `Default | `Value of int ] -> unitval get_tcp_keepalive_idle : 'a t -> [ `Default | `Value of int ]val set_tcp_keepalive_count : 'a t -> [ `Default | `Value of int ] -> unitval get_tcp_keepalive_count : 'a t -> [ `Default | `Value of int ]val set_tcp_keepalive_interval : 'a t -> [ `Default | `Value of int ] -> unitval get_tcp_keepalive_interval : 'a t -> [ `Default | `Value of int ]val set_immediate : 'a t -> bool -> unitval get_immediate : 'a t -> boolval set_xpub_verbose : [> `XPub ] t -> bool -> unitval set_probe_router : [> `Router | `Dealer | `Req ] t -> bool -> unitval set_req_correlate : [> `Req ] t -> bool -> unitval set_req_relaxed : [> `Req ] t -> bool -> unitval set_plain_server : 'a t -> bool -> unitval set_plain_username : 'a t -> string -> unitval get_plain_username : 'a t -> stringval set_plain_password : 'a t -> string -> unitval get_plain_password : 'a t -> stringval set_curve_server : 'a t -> bool -> unitval set_curve_publickey : 'a t -> string -> unitval get_curve_publickey : 'a t -> stringval set_curve_secretkey : 'a t -> string -> unitval get_curve_secretkey : 'a t -> stringval set_curve_serverkey : 'a t -> string -> unitval get_curve_serverkey : 'a t -> stringval get_mechanism : 'a t -> [ `Null | `Plain | `Curve ]val set_zap_domain : 'a t -> string -> unitval get_zap_domain : 'a t -> stringval set_conflate : [> `Pull | `Push | `Sub | `Pub | `Dealer ] t -> bool -> unitval get_fd : 'a t -> Unix.file_descr