Respect Windows' Modern Standby: Close connections when putting the computer to sleep

Description

From an email:

And on Windows it would be really nice if the app could detect when the PC is being put into standby and close the connection beforehand, because otherwise what happens to me is that the iPhone tries to reestablish the connection and that ends up waking the PC back up from standby.

Windows documentation

A system enters modern standby when the display turns off. This will occur in response to:

  • the user pressing the power button
  • the user closing the lid
  • the user selecting Sleep from the power button in Settings
  • the system idling out

Steps to reproduce

TBD

Devices

Device A:
Windows 10+
1.0.0-alpha07

Device B:
iOS
1.0.0-alpha07