Keeping RTCDataChannel open in background mode iOS

292 views
Skip to first unread message

Xavi R. Pinteño

unread,
Sep 30, 2015, 10:52:01 AM9/30/15
to discuss-webrtc
Hi,
   I'm building a chat/video app.
For signaling with the server I use websockets and there's a heartbeat implemented. But at some point when app goes to the
background datachannel dies.
Since it's a p2p chat, server doesn't know when the user is receiving a message, so I cannot rely in remote push notifications.

Is there any way, or does actually make sense to have a datachannel open all the time?

Kaiduan Xie

unread,
Sep 30, 2015, 2:21:17 PM9/30/15
to discuss...@googlegroups.com
Lets assume Alice is chatting with Bob, the application on Bob side
goes to background,

In this case PeerConnection on Alice side will know that the ICE
connection is terminated, then application on Alice side can send a
push notification to application on Bob side. Upon receiving the push
notification from Alice, application on Bob side re-establishes the
PeerConnection/Data Channel including the ICE connectivity check with
Alice and continues the chat.

/Kaiduan
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to discuss-webrt...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/discuss-webrtc/71fe2d6e-8671-47ed-9e31-10a9f4d0819b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages