Post

Replies

Boosts

Views

Activity

Reply to How can I pause reading packets from NEUDPSession
Hi Quinn, Thanks for the response. I think we can use NWConnection over NWUDPSession as all we need is to connect to our VPN server to send/receive encrypted packets and perform handshakes. But I am not sure how I can pause reading packets using NWConnection either, one guess would be: func startReadingPackets() { connection.receiveMessage { [weak self] data, context, success, error in /* Handle packets or error here. */ while (self?.paused) {} self?.startReadingPackets() } }
Mar ’21