Open ryscheng opened 10 years ago
For WebRTC STCP-style data channel, trying to re-use them doesn't save you anything. The cost of tear-down is the same as you'd have to spend to re-use them.
Sounds like we should maintain an lru queue of data channels so that there's a fixed upper limit of how many are active. On Jun 15, 2014 9:26 PM, "Lucas Dixon" notifications@github.com wrote:
For WebRTC STCP-style data channel, trying to re-use them doesn't save you anything. The cost of tear-down is the same as you'd have to spend to re-use them.
— Reply to this email directly or view it on GitHub https://github.com/freedomjs/freedom/issues/13#issuecomment-46140199.
How can you tell that a data channel is not active? I think the only way to do so is to have an explicit close. But maybe you have some other idea.
Transport API uses tags. Cleverly spin up and tear down datachannels
For example, uProxy uses new tags (datachannels) every time a socket is opened. We can probably do two things: a. reuse datachannels for 2 tags that don't overlap. b. tear down datachannels when we don't need them anymore