Update README.md

Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com>
This commit is contained in:
David Rotermund 2023-12-28 15:03:27 +01:00 committed by GitHub
parent 70db6e7b37
commit b31e24505c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,5 +141,18 @@ Output:
(100, 10) (100, 10)
``` ```
## Non-blocking
There is this option to receive packages in a non blocking way:
```python
confirm = False
while not confirm:
try:
packet_in = socket.recv_pyobj(zmq.NOBLOCK)
confirm = True
except zmq.error.Again:
pass
```