enwi / dartzmq

A simple dart zeromq implementation/wrapper around the libzmq C++ library
https://pub.dev/documentation/dartzmq/latest/
MIT License
26 stars 17 forks source link

No Recieve Method for socket Type Sub? #12

Closed wajahat414 closed 1 year ago

wajahat414 commented 1 year ago
Screen Shot 2022-10-06 at 1 52 02 PM

while listening to the subscription got this error?

wajahat414 commented 1 year ago

Also The package Does not catches ZMQ exception? what about that?Like if I put Listen Code in try catch it does not catches the exception so I can not respond to exception thown by the library identify the exception,

enwi commented 1 year ago

The Exception is thrown here https://github.com/enwi/dartzmq/blob/33d8da224c81b09e57547e3293a339de4611e176/lib/src/zeromq.dart#L106

As far as I see it EINTR can be irgnored here. According to the ZGuide

If your code is blocking in a blocking call (sending a message, receiving a message, or polling),
then when a signal arrives, the call will return with EINTR.
wajahat414 commented 1 year ago

yeah I saw it , when I ignore it works fine

enwi commented 1 year ago

Though since I updated the binaries EINTR gets thrown seemingly random, even when calling connect on a socket

wajahat414 commented 1 year ago

You mergeed changes it to main?

enwi commented 1 year ago

https://github.com/enwi/dartzmq/issues/11#issuecomment-1271203768

wajahat414 commented 1 year ago

okay..also add an example check for error code and ignore it,

wajahat414 commented 1 year ago

so is it done?

enwi commented 1 year ago

Done with 9a094e15baed505c91e07327c0151cd3fb841df4