Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5033

MicroPython • Re: How to receive large (>1024 byte) UDP datagram packets?

$
0
0
Seems you are right. I couldn't get 'recvinto' to work with my regime; it just blocks until it has filled the buffer which is no good for me as I am sending variable size packets. It did however exit 'recvinto' when the connection was closed, then started to return zeroes. It seems you could check if the returned size is zero or less than expected.

Returning zero was what I got when using 'recvfrom' and the connection was closed, which does return on each packet.

Maybe there's some 'socket.' method for determining if the connection has closed ? Not sure; it's all a new adventure to me.

Statistics: Posted by hippy — Sat Jul 27, 2024 12:05 pm



Viewing all articles
Browse latest Browse all 5033

Trending Articles