Thanks @mikael and @JonB! I'll take a look at those options...using the notification center to register for the lock-related notifications seems like a decent solution.

Has anyone noticed anything of this nature? I haven't had a chance to try making some simple tests to see if it is "normal" behavior for a socket to become disconnected when the device is locked/sleeps.