In my program I need to break from the loop and from the synchronous operation
thread_socket.recv_from(&mut buf).await; (see here), how could I achieve this?
The program is expecting another input but none will be ever sent because the job is done (all packets have been received). I tried to break from the different loop before realizing that (probably) the reason why it is not proceeding further is because of being stuck at this particular line. I don't really want a timeout but more like a goto from line 200 to line 266.
I have also tried to send a custom random packet with
echo -n -e '\x00\x01\x00\x45\x01\x00\x00' >/dev/udp/localhost/8080 but I would get a panic error since I have already broke apart from the task::spawn, confirming that the break of line 201 happened successfully.
Thank you very much for any advice!