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

send non-binary data #2

Closed
NaarGes opened this issue Oct 27, 2021 · 7 comments
Closed

send non-binary data #2

NaarGes opened this issue Oct 27, 2021 · 7 comments

Comments

@NaarGes
Copy link

NaarGes commented Oct 27, 2021

Hi, why socket.send() parameter is from List<int> type? does it get data as binary array? what if someone wants to send data non-binary?

and I have another question; how we can receive response from a req socket connection?

@enwi
Copy link
Owner

enwi commented Oct 29, 2021

Hi, why socket.send() parameter is from List type? does it get data as binary array?

Hey @NaarGes the List<int> is treated as a binary array. I choose it for ease of use for example when using protobuf to serialize/deserialize data, because they use an Uint8List which just implements a List<int>.

what if someone wants to send data non-binary?

If you want to send non-binary data you need to use some kind of serialization/deserialization mechanism like protobuf.

how we can receive response from a req socket connection?

Just use the Streams of ZSocket one of messages, frames or payloads

@enwi
Copy link
Owner

enwi commented Oct 29, 2021

I updated the README and example to show how to receive messages

@enwi
Copy link
Owner

enwi commented Oct 30, 2021

Has this question been resolved for you @NaarGes ?

@NaarGes
Copy link
Author

NaarGes commented Oct 31, 2021

Actually I implement it bud I couldn't use it for my flutter application, It gets libzmq.so not found error (or sth like that) in runtime. I tried adding libzmq.so in my project using your hints from [#1 ] but still couldn't fix that error.
So because I have time limits, I switched using jeromq itself in Kotlin through MethodChannel and EventChannel in flutter.

@enwi
Copy link
Owner

enwi commented Oct 31, 2021

Yeah getting it to work on Android is a little more difficult than on windows. For Android a compiled version of the standard c++ library is needed as well. I will need to add that to the documentation!

@enwi enwi closed this as completed Oct 31, 2021
@NaarGes
Copy link
Author

NaarGes commented Nov 1, 2021

It's a very useful and unique package for dart. Keep it on!
good luck

@enwi
Copy link
Owner

enwi commented Nov 2, 2021

I've updated the README and improved the steps for Android

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