All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added
examples/README.md
, to describe the example files. zmq_tokio::Socket::outgoing_multipart
returns aMultiMessageSink
.zmq_tokio::Socket::outgoing
returns aMessageSink
.- Added
MultipartMessageSink
for multi-part message sink. - Added
MessageSink
for a single-part message sink. - Added
zmq_tokio::convert_into_tokio_socket
function as a convenience for developers. - Added
examples/requester-multipart.rs
, a REQ client that sends a couple of multi-part messages, always getting a response. - Added
examples/responder-multipart.rs
, a REP server that listens for incoming multi-part messages, responding with another message. - Added
examples/requester.rs
, a REQ client that sends a couple of single-part messages, always getting a response. - Added
examples/responder.rs
, a REP server that listens for incoming single-part messages, responding with another message. - Added
zmq_tokio::transport::MessageTransport
, which implements bothSink
andStream
, for handling single-part messages. - Added
zmq_tokio::transport::MultipartMessageTransport
, which implements bothSink
andStream
, for handling multi-part messages. zmq_tokio::Socket::incoming_multipart
returns aMultiMessageStream
.zmq_tokio::Socket::incoming
returns aMessageStream
.- Added
MultipartMessageStream
for multi-part message streaming. - Added
MessageStream
for single-part message streaming. - Defined the
SocketRecv
trait to have a method API for receiving messages with ZeroMQ. - Defined the
SocketSend
trait to have a method API for sending messages with ZeroMQ.
- Cleaned-up the prelude by removing piecewise re-exports from
zmq
, in favor of re-exporiting the whole crate. - Remove paragraph mentioning non-existing example in
README.md
. - Refactored code into
poll_evented.rs
, for implementations of external types. - Refactored
SocketFramed
type intotransport
module. - Moved example code from
README.md
, intoexamples/echo-pair.rs
,examples/echo-pub-sub.rs
, andexamples/echo-push-pull-multipart.rs
.
zmq_tokio::Socket::get_ref
replaceszmq_tokio::Socket_get_mio_ref
. The newget_ref
method returns the inner&PollEvented<zmq_mio::Socket>
.get_mio_ref
is now private, pending removal.- Future types now use
SocketRecv + AsyncRead
andSocketSend + AsyncWrite
trait boundaries. Previously, the underlyingzmq_mio::Socket
fromPollEvented<zmq_mio::Socket>
was being used, instead of the poll-evented socket itself. The fix is made by implementingSocketRecv
andSocketSend
forPollEvented<zmq_mio::Socket>
, and having the trait methods use the proper tokio polling-mechanisms (particularly usingneed_read()
andneed_write()
from the poll-evented socket)..
CHANGELOG.md
, is this file.- Example for
README.md
echoing a single message with futures. - Example for
README.md
echoing a multipart message with futures. - Example for
README.md
echoing a single message with tokio transports. - Doctest in
src/lib.rs
echoing a single message with futures. - Doctest in
src/lib.rs
echoing a multipart message with futures. - Doctest in
src/lib.rs
echoing a single message with tokio transports. - Re-export
SocketType
,Message
,SNDMORE
,Error
,SocketType::*
, from therust-zmq
crate, for convenience. This should makeextern crate zmq_tokio
more attractive thanextern crate zmq
, when dealing with async communications. zmq_tokio::Context
mirrors the traits fromzmq_mio::Context
.zmq_tokio::Context::get_inner
method gets a clone of the underlyingzmq_mio::Context
zmq_tokio::Socket
implementsRead
,Write
fromstd::io
.zmq_tokio::Socket
implementsAsyncRead
andAsyncWrite
fromtokio_io::io
.zmq_tokio::Socket
mirrors the traits fromzmq_mio::Socket
.zmq_tokio::Socket
methodssend
,send_multipart
,recv
,recv_multipart
. These methods return futures, and will not work outside of a tokio task. This expands our coverage of thezmq::Socket
API.zmq_tokio::future::SendMessage
is a future type returned byzmq_tokio::Socket::send
.zmq_tokio::future::SendMultipartMessage
is a future type returned byzmq_tokio::Socket::send_multipart
.zmq_tokio::future::ReceiveMessage
is a future type returned byzmq_tokio::Socket::recv
.zmq_tokio::future::ReceiveMultipartMessage
is a future type returned byzmq_tokio::Socket::recv_multipart
.
- Replaced
&mut self
arguments that are no longer needed. - Updated cargo dependencies.
README.md
, a basic description about this library.tests/smoke.rs
: integration test for poll-driven, asynchronous, sockets.zmq_tokio::Context
, wrapper forzmq_mio::Context
, which buildszmq_tokio::Socket
instances.zmq_tokio::Socket
, wrapper fortokio_core::reactor::PollEvented<zmq_mio::Socket>
, capable of running on a tokio reactor.zmq_tokio::SocketFramed
, a type that implementsfutures::Sink
andfutures::Stream
.