Socket.io-client-swift: Access voipEnabled property

Created on 22 Oct 2015  ·  5Comments  ·  Source: socketio/socket.io-client-swift

Thank you for this great library. I'm trying to use socket.io to build a VOIP application and I would require to keep the the socket.io connection alive while in background. I'm aware that iOS provides just a limited amount of time to operate while in background. However I noticed that for VOIP applications this is different as the O/S will not kill any sockets that's created with NSStreamNetworkServiceTypeVoIP.

I've noticed that there is a voipEnabled property inside the WebSocket.swift file but there is no setter for this. When I hardcode this value to true, I'm able to keep the Socket connection when in background.

I would highly appreciate a suggestion or reply to this issue. Thanks

enhancement patched

Most helpful comment

@janiduw Can you provide how you keep the Socket connection when in background?

All 5 comments

I guess I can add an option that allows toggling this setting.

That would be helpful. May I know how this property was initially planned to be used ?

I did not write the WebSocket library, but I assume it's used for the very reason you need it. I just never assumed anyone would be using socket.io to create a VoIP application. Since it seems raw WebSockets or UDP streams would be more efficient

The actual use case is that there is a voip server running on an embedded device. This device does not have any access to the internet. I'm planning to use socket.io on this embedded device to push real time information to the iOS app, things like device temperature etc.

@janiduw Can you provide how you keep the Socket connection when in background?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

heisian picture heisian  ·  4Comments

alionthego picture alionthego  ·  4Comments

huangxiaolin0425 picture huangxiaolin0425  ·  6Comments

roma86 picture roma86  ·  4Comments

Seonift picture Seonift  ·  4Comments