You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, your convert(IOStream, msg) function makes a copy of the data into a MemIO stream. (PS. memio is now deprecated in Julia, you should now use IOBuffer. And the function should probably be IOBuffer(msg) rather than convert.)
However, in the longer run it would be nicer to declare a new type ZMQ.MsgStream <: IOStream in which MsgStream(msg) wraps around a ZMQMessage (or ZMQ.Msg or whatever you decide to call it after #12) and provides a (read-only?) stream interface to the underlying data without making a copy.
The text was updated successfully, but these errors were encountered:
Do we really need IOStream support? The docstring says it's specifically to represent file descriptors, which I don't think we have an analogue for with zmq_msg_t. I think IOBuffer(msg) already does what we want since Message is an AbstractArray.
Right now, your
convert(IOStream, msg)
function makes a copy of the data into aMemIO
stream. (PS.memio
is now deprecated in Julia, you should now useIOBuffer
. And the function should probably beIOBuffer(msg)
rather thanconvert
.)However, in the longer run it would be nicer to declare a new type
ZMQ.MsgStream <: IOStream
in whichMsgStream(msg)
wraps around aZMQMessage
(orZMQ.Msg
or whatever you decide to call it after #12) and provides a (read-only?) stream interface to the underlying data without making a copy.The text was updated successfully, but these errors were encountered: