Open kartikpatel211 opened 6 years ago
i faced the same issue.i was able send data on socket but not able receive data while cellular data was on.It seems to be bug. Also i tried same scenarios with other libraries such as BlueSocket etc and it is working fine even if cellular data remains on. Hope this bug shall be fixed soon.
It's a well-known limitation of the POSIX networking on iOS that it cannot enable cellular radio by itself, unlike CoreFoundation streams and other higher-level networking frameworks. Therefore, you shouldn't rely on this package on iOS.
That being said, I have some more bad news. This repo is abandonware, as Vapor 3 replaced the homebrew networking with SwiftNIO, and Vapor 2 is not maintained anymore. I suggest looking for alternatives.
Thanks @vzsg for info.
In iOS mobile app, when mobile/cellular data and WiFi connections - both are Enabled and App tries to perform socket operation on WiFi connected device, app able to create connection and send data successfully but it does not able to receive response and throws exception: "The operation couldn’t be completed. (appName.SocketsError error 1.)"