vapor-community / sockets

🔌 Non-blocking TCP socket layer, with event-driven server and client.
MIT License
575 stars 54 forks source link

Response not received #168

Open kartikpatel211 opened 6 years ago

kartikpatel211 commented 6 years ago

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.)"

rayWille commented 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.

vzsg commented 6 years ago

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.

rayWille commented 6 years ago

Thanks @vzsg for info.