Struct zmq_rs::Context
[−]
[src]
pub struct Context { /* fields omitted */ }
Methods
impl Context
[src]
fn new() -> Result<Context, Error>
[src]
Create new 0MQ context
Binding of void *zmq_ctx_new ();
The function creates a new ØMQ context.
Thread safety
A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.
fn shutdown(&mut self) -> Result<(), Error>
[src]
Shutdown a 0MQ context
Binding of int zmq_ctx_shutdown (void *context);
The function will shutdown the ØMQ context context. Context shutdown will cause any blocking operations currently in progress on sockets open within context to return immediately with an error code of ETERM. With the exception of Socket::Close(), any further operations on sockets open within context will fail with an error code of ETERM.
fn get_io_threads(&self) -> Result<i32, Error>
[src]
fn get_max_sockets(&self) -> Result<i32, Error>
[src]
fn get_socket_limit(&self) -> Result<i32, Error>
[src]
fn is_ipv6_enabled(&self) -> Result<bool, Error>
[src]
fn set_io_threads(&mut self, optval: i32) -> Result<(), Error>
[src]
fn set_max_sockets(&mut self, optval: i32) -> Result<(), Error>
[src]
fn set_thread_priority(&mut self, optval: i32) -> Result<(), Error>
[src]
fn set_thread_sched_policy(&mut self, optval: i32) -> Result<(), Error>
[src]
fn set_ipv6(&mut self, optval: i32) -> Result<(), Error>
[src]
fn socket(&self, t: SocketType) -> Result<Socket, Error>
[src]
Create 0MQ socket
Binding of void *zmq_socket (void *context, int type);
The type argument specifies the socket type, which determines the semantics of communication over the socket. The newly created socket is initially unbound, and not associated with any endpoints. In order to establish a message flow a socket must first be connected to at least one endpoint with Scoket::Connect, or at least one endpoint must be created for accepting incoming connections with Socket::Bind().