I guess a flexible solution might be to just emit any unhandled packets as an event, and you can pick those up?
Could you provide a bit of info about your setup though? What device are you using, and what are you using to connect to the network?
Usually something like WiFi or Ethernet will use enough power when connected that the actual power draw of the Espruino device when connected is negligible, so there's not been much effort put into making the device sleep properly when there's a connection active.
It depends on how you're connecting, but if it's using something like a serial connection then deep sleep will stop the Espruino device listening for any incoming serial data, which will mean that you not only lose any incoming data but also potentially get out of sync.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I guess a flexible solution might be to just emit any unhandled packets as an event, and you can pick those up?
Could you provide a bit of info about your setup though? What device are you using, and what are you using to connect to the network?
Usually something like WiFi or Ethernet will use enough power when connected that the actual power draw of the Espruino device when connected is negligible, so there's not been much effort put into making the device sleep properly when there's a connection active.
It depends on how you're connecting, but if it's using something like a serial connection then deep sleep will stop the Espruino device listening for any incoming serial data, which will mean that you not only lose any incoming data but also potentially get out of sync.