-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IOS VoIP integration, special sockets and timeout handlers for keepalive #53
Comments
A bit more about specifics, we use TxmppSocket in xmppclient for our xmpp conneciton. When creating the thread, we may simple be able to pass macsocketserver to the thread() method in voiceclient.cc. @https://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/NetworkingTopics/Articles/UsingSocketsandSocketStreams.html "Note: POSIX networking does not activate the cellular radio on iOS. For this reason, the POSIX networking API is generally discouraged in iOS." We can't use posix it seems, shit, looks pretty tangled, but maybe not. It seems we should need to do something like this: MacAsyncSocket uses CFSocket, which is a c bsd socket. I assume we would need to create a new socket, IOSAsyncSocket that uses the correct interfaces, but will have to confirm further. Otherwise if we can reuse MacAsyncSocket then we would have to reuse CFSocket with CFSocketNativeHandle CFSocketGetNative (CFSocketRef s) to plug into the code from the stackoverflow example above and use the read/write streams from the example. Don't think/am not sure that would work, as I think CFSocket is an underlying POSIX socket that won't work well on IOS. Current code flow of using posix sockets: void TXmppSocket::CreateCricketSocket(int family) { ............... Based on socket server that's passed in, construct message queue libjingle/talk/base/thread.cc -> ....... if no socket server, create the default PhysicalSocketServer() MessageQueue::MessageQueue(SocketServer* ss) ...... // Creates the underlying OS socket (same as the "socket" function). |
Trying to work on this (backgrounding on iOS), but having some difficulties switching to the MacCFSocketServer. I got it working in the libjingle call client example, but can't seem to get it going here. I switched the pss_ var from Physical to MacCF, though it's getting an assertion failure. |
This is the exact error I get: Error(common.cc:67): /Users/seankovacs/Documents/webrtcjingleproject/trunk/third_party/libjingle/talk/base/macsocketserver.cc(146): ASSERT FAILED: CFRunLoopGetCurrent() == run_loop_ @ Wait |
I worked on this a bit but lost track of my unwprking patch. I think in the If you want to mess around with it you'll also need to uncomment the
|
Hi guy, you may want to try my work at: On Fri, May 3, 2013 at 4:00 AM, Luke Weber notifications@github.com wrote:
|
Yeah I was able to get the voip in the background thing working. Just this occasional ssl write error. I'll try hailg's version using the ios xmppframework and see if that helps. |
Do you mind sharing, others might find the code useful? What are your thoughts on xmppframework vs just using libjingle? |
IOS recommends a few things for VoIP, specifically special sockets and timeout handlers.
http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW12
There are several requirements for implementing a VoIP app:
Socket that would need to change to the IPhone recommended version is used here:
./third_party/libjingle/talk/xmpp/xmppengineimpl.cc
In terms of timeouts, we would need a handler that wakes up and calls the white space keepalive method located in clientsignalingthread.cc.
The text was updated successfully, but these errors were encountered: