Is it possible to receive UDP packets in a worker?
I'm looking at having some very small IoT devices send a UDP packet with some sensor data, and wondered if there is a way to receive that (and respond) in a worker (in rust if possible would be great)
3 Replies
Workers currently only have HTTP (and WebSocket) ingress
I'd probably replace the udp with a http request, and ignore any responses/body parsing to get as close as possible to udp
OK, thanks for the clarification. That increases the device footprint a bit - but understood. Are such things on the roadmap or do you think they will ever happen?
I have no information about that, unfortunately, I'd love to see it for DNS and other interesting use cases
you can probably get away with (assuming no bot protections on the zone)
- opening a tcp connection, if no need for tls
- send a http 1.1 request, one fix line and a few headers, then body
- ignore any response