VPN blocking incoming reads CFReadStreamRef iOS

277 Views Asked by At

CFReadStreamRef used in CFStream connection to websocket.

Properties set:

// Ensure the CF & BSD socket is closed when the streams are closed. CFReadStreamSetProperty(theReadStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);

// so messages from the stream are processed when the app is in the background CFReadStreamSetProperty(theReadStream, kCFStreamNetworkServiceType, kCFStreamNetworkServiceTypeVoIP);

Need application to process incoming messages while in the background.

When on wifi I have no problem... connection is made and any incoming messages are immediately read and processed when application is in the background.

When connected over VPN to the same network, connection is made BUT any incoming messages are queued until application is brought back the foreground.

I'm attempting to locate the cause. Is this a stream setting issue I can fix in the code or an issue with the VPN settings?

0

There are 0 best solutions below