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

multipart send/recv #12

Merged
merged 3 commits into from
Jan 20, 2017
Merged

multipart send/recv #12

merged 3 commits into from
Jan 20, 2017

Conversation

tjvr
Copy link
Contributor

@tjvr tjvr commented Jan 17, 2017

Hiya! Just a couple methods I found useful—I need to work with multipart messages, which seems like it'd be a good addition to the Swifty library.

Let me know if this is useful to you too—no obligation to merge it! :)

Have a nice day,
Tim

I don't know an easier way to get a C buffer without using NSData. I think ZMQ
will free the buffer for us, so we don't have to worry about that?

I'm pretty sure `string.characters.count` in the existing implementation is
dangerous: surely it will do the wrong thing for wide chars!
@azawawi
Copy link
Owner

azawawi commented Jan 17, 2017

Awesome. Just a couple of comments for it to get merged. Please add a defer { } block to zmq_msg_close after creation to handle failures and prevent memory leaks.

@azawawi
Copy link
Owner

azawawi commented Jan 18, 2017

@tjvr Any update on this one?

Apparently this will handle failures & prevent memory leaks. :-)
@tjvr
Copy link
Contributor Author

tjvr commented Jan 19, 2017

@azawawi Like this? :)

@azawawi azawawi merged commit a19f25f into azawawi:master Jan 20, 2017
@azawawi
Copy link
Owner

azawawi commented Jan 20, 2017

Thanks 👍

@tjvr
Copy link
Contributor Author

tjvr commented Jan 20, 2017

Cheers! :)

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

Successfully merging this pull request may close these issues.

2 participants