On multiple occasions, my Playdate has had a WiFi connection but some networking issue was preventing it from working. I heard this same complaint from a developer demonstrating their game at a recent conference as well.
I went to try and make a Network Diagnostics app to sell on the store, but two things prevent me from providing effective ping and traceroute functionality:
- I cannot specify TTL (Time To Live) or any other TCP flags for the TCP connection. If I could set TTL (and interpret an accurate response when it does reach 0), I could implement
traceroutefunctionality that would determine when conference internet is on the fritz. - The PDNetErr error codes are so high level that there’s no way to distinguish an Invalid Gateway versus TTL Expired versus anything else.
Instead of cluttering the TCP API, maybe an ICMP API could be exposed that would allow for this kind of diagnostic tool to be created? Lower-level BSD-style network access would be welcome, but I appreciate wanting to keep the Lua and C APIs somewhat aligned.