Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support copy-free IOStream #17

Closed
stevengj opened this issue Jul 23, 2013 · 2 comments
Closed

support copy-free IOStream #17

stevengj opened this issue Jul 23, 2013 · 2 comments

Comments

@stevengj
Copy link
Contributor

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.

@JamesWrigley
Copy link
Member

JamesWrigley commented Jul 19, 2024

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.

Relevant PR: #212.

@stevengj
Copy link
Contributor Author

Yes, this is probably obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants