Photon UDP function return values

When building with 0.4.3 for photon :

UDP.begin( port ) always returns 0 .
Previously, the core firmware returns an indication whether the port was opened ( return > 0 ) or failed to open ( return < 1 )
The returned value in spark_wiring_udp.cpp ( bound ) is initiated as 0 but never updated.

UDP.write() returns 0 on success, previously it would return the number of bytes sent. It returns an error value ( < 0 ) if the write fails.

Can we get an update about when these will be have the correct return values implemented?
(Or on when the UDP.endPacket() behaviour will be implemented for photon?)

Thanks.

EDIT: Added that the udp.write error return values

Also, semi-related: UDPparsePacket() now successfully parses one datagram at a time on the photon. :smile:

2 Likes

Here’s an issue to track this. I hope to implement it in the next release. (0.4.5)