taking self in, disallowing it to be called multiple times. In datachannel-rs there is no such limitation, as can be seen from line 355 of peerconnection.rs:
It can be useful to have e.g. one unordered and unreliable DataChannel paired with an ordered an reliable DataChannel.
~It seems some internal changes are needed to make this happen, peer_con: Arc<Mutex<Box<RtcPeerConnection<ConnInternal>>>> in PeerConnection probably needs to be an Arc as well, for one.~ I guess I misread it :).
It seems the interface is designed so that it is impossible to create multiple DataStreams for one PeerConnection. Line 240 of lib.rs says:
taking
self
in, disallowing it to be called multiple times. Indatachannel-rs
there is no such limitation, as can be seen from line 355 of peerconnection.rs:The documentation for
libdatachannel
doesn't outright say that there can be multiple DataChannels, but it does say thatrtcCreateDataChannel
adds a datachannel to aPeer Connection
and in general this is possible.It can be useful to have e.g. one unordered and unreliable
DataChannel
paired with an ordered an reliableDataChannel
.~It seems some internal changes are needed to make this happen,
peer_con: Arc<Mutex<Box<RtcPeerConnection<ConnInternal>>>>
inPeerConnection
probably needs to be anArc
as well, for one.~ I guess I misread it :).