codypiersall / pynng

Python bindings for Nanomsg Next Generation.
https://pynng.readthedocs.io
MIT License
260 stars 58 forks source link

Introduce block-argument to send #97

Closed deets closed 2 years ago

deets commented 2 years ago

By default, sending blocks. When block=False, raise pynng.TryAgain if no data could be delivered.

codypiersall commented 2 years ago

Thanks for the PR! I like the look of this, and will merge if you can add a test to the test suite for this behavior.

codypiersall commented 2 years ago

Thanks for the PR! I like the look of this, and will merge if you can add a test to the test suite for this behavior. And sorry for the multi-month delay in looking at this.

deets commented 2 years ago

@codypiersall I added a non-blocking test. I trust the "bog standard" send is already covered :)

And I updated the documentation in the process, because just running pytest provokes an error due to some mbed_tls-script or something being picked up.