Correct approach when a channel is forcibly closed

40 views
Skip to first unread message

Roderick Kennedy

unread,
Mar 13, 2023, 4:54:01 AM3/13/23
to discuss-webrtc
I have a C++ client and a C++ server talking via WebRTC (signaling is a separate ENet connection).
I can send data on my data channels, but they sometimes close - they change state first to Closing, then to Closed. There is sometimes an SSL-related error reported before the channel state changes, but it's not clear if this is the reason. I do receive an IceConnectionChange before the channels close, but the new state is kIceConnectionConnected).
I'd like to know the correct approach to re-establishing the connection.
The DataChannelInterface has a Close() member but no Open() function.
But it seems I can't create new data channels without closing the peer connection.
What is the "correct" way to re-establish a data channel that has closed due to some error?

Thanks for any advice.
Reply all
Reply to author
Forward
0 new messages