The general rule for networking in the background on iOS is that everything works as long as your process is running. Once your process gets suspended, you start running into edge cases. TN2277 Networking and Multitasking talks about this idea, although it’s somewhat out of date. Specifically, I now talk about connections being defuncted rather than using the older socket resource reclaim terminology, because Network framework supports a user-space networking stack that doesn’t involve sockets. However, it sounds like you’re using BSD Sockets directly, in which case TN2277 is still as relevant as it ever was. Specifically: [quote='808351021, RiteshV, /thread/808351, /profile/RiteshV'] we attempt to establish a DTLS handshake over our existing socket [/quote] It’s likely that this socket was defuncted when your app was suspended in the background, and thus the issue isn’t with DTLS per se, but rather with networking proper. If you open a network connection in this situation, does that work? Share and
Topic:
App & System Services
SubTopic:
Networking
Tags: