Struct utils_box::zmq_client::ZmqClient
source · pub struct ZmqClient { /* private fields */ }
Implementations§
source§impl ZmqClient
impl ZmqClient
sourcepub fn new(server_ip: String, server_port: u16) -> Result<Self>
pub fn new(server_ip: String, server_port: u16) -> Result<Self>
Create a new ZMQ connection to the specified server and connect to it
sourcepub fn server_info(&self) -> (String, u16)
pub fn server_info(&self) -> (String, u16)
Get the server IP and port information
pub fn send(&self, data: &[u8]) -> Result<()>
pub fn receive(&self) -> Result<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ZmqClient
impl Send for ZmqClient
impl !Sync for ZmqClient
impl Unpin for ZmqClient
impl UnwindSafe for ZmqClient
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more