Crates.io | threadsafe_zmq |
lib.rs | threadsafe_zmq |
version | 1.0.1 |
source | src |
created_at | 2024-10-06 15:47:31.718327 |
updated_at | 2024-10-08 08:49:19.350342 |
description | Threadsafe zeromq |
homepage | |
repository | https://github.com/Elvis339/threadsafe_zmq |
max_upload_size | |
id | 1399162 |
size | 26,340 |
This implementation is based on Golang's zmqchan, all the credit should go the the author of zmqchan
This is just a tweaked implementation in Rust
+-------------------+
| Client |
+-------------------+
|
v
(Client Sends Message)
|
+-----------------------------------v----------------------------------------+
| ChannelPair |
| |
| +--------------+ |
| | z_sock | |
| | (ZeroMQ SOCK)| |
| +--------------+ |
| | |
| v |
| (Message Forwarded to Channel) |
| | |
| +--------------+ |
| | channel | |
| | (Crossbeam | |
| | Channel) | |
| +--------------+ |
| | |
| v |
| (Message Consumed by `z_tx[IN]`) |
| +---------------+ |
| | z_tx[IN] | |
| | (PAIR Socket) | |
| +---------------+ |
| | |
| | |
| (Message Sent to `z_tx[OUT]`) |
| | |
| v |
| +---------------+ |
| | z_tx[OUT] | |
| | (PAIR Socket) | |
| +---------------+ |
| (Message Passed to `z_sock`) |
| | |
| | |
| (Message Prepared for `z_sock`) |
| v |
| +--------------+ |
| | z_sock | |
| | (Writable) | |
| +--------------+ |
| | |
| (Message Sent Back to Client) |
| | |
+----------------------------------------------------------------------------+
|
v
(Client Receives Response)
|
+-------------------+
| Client |
+-------------------+