Hey, very cool project! Today i was testing the code in a long run, and this happend:
[DEBUG ] [MainThread] [2023-01-28 03:57:24,939 ] try to communicate addr=('192.168.0.30', 50001) bind=['', 50001]
[DEBUG ] [MainThread] [2023-01-28 03:57:24,940 ] select curve NIST256p (static)
[DEBUG ] [MainThread] [2023-01-28 03:57:25,234 ] success getting shared key
[DEBUG ] [MainThread] [2023-01-28 03:57:25,250 ] success hand shaking
[DEBUG ] [MainThread] [2023-01-28 03:57:25,498 ] success get MUT size 1472b
[DEBUG ] [MainThread] [2023-01-28 03:57:25,500 ] connect success! mtu=1472
[DEBUG ] [Thread-2 ] [2023-01-28 03:57:25,523 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:57:25,524 ] send now! loss=0 time=1674878245
[DEBUG ] [SRUDP ] [2023-01-28 03:57:25,528 ] reached end of chunk seq=3
[DEBUG ] [SRUDP ] [2023-01-28 03:57:25,532 ] allow sending operation again seq=3
[DEBUG ] [Thread-1 ] [2023-01-28 03:57:25,563 ] received! 4110b loss=0 79.25kb/s
[DEBUG ] [SRUDP ] [2023-01-28 03:57:45,519 ] reached end of chunk seq=6
[DEBUG ] [Thread-2 ] [2023-01-28 03:57:45,558 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:57:45,559 ] send now! loss=0 time=1674878265
[DEBUG ] [Thread-2 ] [2023-01-28 03:57:45,562 ] send broadcast!
[DEBUG ] [Thread-1 ] [2023-01-28 03:57:45,564 ] received! 4110b loss=0 75.75kb/s
[DEBUG ] [SRUDP ] [2023-01-28 03:57:45,567 ] allow sending operation again seq=6
[DEBUG ] [SRUDP ] [2023-01-28 03:58:05,523 ] reached end of chunk seq=9
[DEBUG ] [SRUDP ] [2023-01-28 03:58:05,526 ] find you!!! (Packet(BCT seq:0 retry:0 time:1674878285.51 data:27b))
[DEBUG ] [Thread-1 ] [2023-01-28 03:58:05,563 ] received! 4110b loss=0 83.46kb/s
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:05,596 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:05,596 ] send now! loss=0 time=1674878285
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:05,599 ] send broadcast!
[DEBUG ] [SRUDP ] [2023-01-28 03:58:05,603 ] allow sending operation again seq=9
Exception in thread SRUDP:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/srudp/srudp/__init__.py", line 449, in _backend
self.sendto(self._encrypt(packet2bin(p)), self.address)
File "/home/pi/srudp/srudp/__init__.py", line 667, in sendto
return self.receiver_socket.sendto(data, address)
OSError: [Errno 101] Network is unreachable
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:25,631 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:25,632 ] send now! loss=0 time=1674878305
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:45,664 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:58:45,664 ] send now! loss=0 time=1674878325
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:05,696 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:05,697 ] send now! loss=0 time=1674878345
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:25,729 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:25,730 ] send now! loss=0 time=1674878365
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:45,762 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 03:59:45,762 ] send now! loss=0 time=1674878385
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:05,795 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:05,795 ] send now! loss=0 time=1674878405
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:25,827 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:25,828 ] send now! loss=0 time=1674878425
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:25,831 ] send broadcast!
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:45,863 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:00:45,864 ] send now! loss=0 time=1674878445
[DEBUG ] [Thread-2 ] [2023-01-28 04:01:05,906 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:01:05,907 ] send now! loss=0 time=1674878465
[DEBUG ] [Thread-2 ] [2023-01-28 04:01:25,939 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:01:25,940 ] send now! loss=0 time=1674878485
[DEBUG ] [Thread-2 ] [2023-01-28 04:01:25,943 ] send broadcast!
The "Network is unreachable" it is intentional, i was testing how the code would behave in the case of that happening.
But the wired thing comes after:
[DEBUG ] [Thread-2 ] [2023-01-28 04:17:47,605 ] send now! loss=0 time=1674879467
[DEBUG ] [Thread-2 ] [2023-01-28 04:17:47,608 ] send broadcast!
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:07,641 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:07,642 ] send now! loss=0 time=1674879487
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:07,645 ] send broadcast!
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:27,678 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:27,679 ] send now! loss=0 time=1674879507
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:47,713 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:18:47,713 ] send now! loss=0 time=1674879527
[DEBUG ] [Thread-2 ] [2023-01-28 04:19:07,747 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:19:07,748 ] send now! loss=0 time=1674879547
[DEBUG ] [Thread-2 ] [2023-01-28 04:19:27,781 ] send operation success 4110b
[DEBUG ] [Thread-2 ] [2023-01-28 04:19:27,782 ] send now! loss=0 time=1674879567
[DEBUG ] [Thread-2 ] [2023-01-28 04:19:47,808 ] buffer is full and wait for signaled
[DEBUG ] [Thread-2 ] [2023-01-28 04:20:08,810 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:20:29,811 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:20:50,813 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:21:11,814 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:21:32,816 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:21:53,817 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:22:14,819 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:22:35,820 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:22:56,822 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:23:17,823 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:23:38,825 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:23:59,826 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:24:20,827 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:24:41,829 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:25:02,830 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:25:23,832 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:25:44,833 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:26:05,835 ] waiting for sending buffer have space..
[DEBUG ] [Thread-2 ] [2023-01-28 04:26:26,836 ] waiting for sending buffer have space..
(...)