erickt / rust-zmq

Rust zeromq bindings.
Apache License 2.0
887 stars 189 forks source link

Implement the `Write` and `Read` traits for sockets(?) #254

Closed nagisa closed 5 years ago

nagisa commented 5 years ago

It would be great if we could make ∅MQ to blend in with the usual I/O streams. Some of this could be achieved with Write and Send trait impls(?).

birkenfeld commented 5 years ago

Dupe of https://github.com/erickt/rust-zmq/issues/238 - in short, the semantics does not match. zmq sockets don't deal in byte streams, but messages (and in some cases, streams of messages).

The exception may be ZMQ_STREAM sockets, which are meant for interfacing with non-zmq TCP sockets.