-
Notifications
You must be signed in to change notification settings - Fork 23
protocol: Rework to allow using the same socket for several peerTypes #76
Conversation
b6accb2
to
b41b006
Compare
Can you edit the MR to remove the metadata commit? |
It would be a loss of time :-) |
d6a3256
to
462a27e
Compare
Then don't propose before the other MR has been merged, that's also a waste of time ;) |
497bc53
to
6adcdd5
Compare
Well skipping the commit while reviewing isn't that hard ;) |
I'm not reviewing per-commit on github, comments there have a bad tendency to disappear on force push .. |
156c66a
to
3827daf
Compare
Let's move it all to gst-plugins-rs ;) In any case, this MR should be ready. |
78c18b0
to
aa7a7cc
Compare
The
What do you think? |
Sounds like you need to maintain more state in both peers to retain the session ID which you do not care about in most cases so I don't see how that simplifies anything in practice. |
It simplifies things by removing an error case (the peer exists but is not registered as the provided type). Besides that, the message relates to ending a session, so expecting whoever wants to do that to keep a trace of a session ID isn't that unreasonable :) |
Well, it means you have a different set of possible errors yes, not sure one error set is simpler or not (in the code detecting this specific error is very simple).
Unreasonable no, not necessary, yes. |
Well I think it is necessary to get this merged :) |
dda39b2
to
8465dbb
Compare
444222d
to
59ce6b9
Compare
1678458
to
15f1e8a
Compare
This way we can use the same WebSocket where several peerTypes being communicated and some those type can be unregistered, re registered without ever closing the Socket connection. This also introduces sensible symmetry between different message types.
This allows for more use cases to be handled like having several session between 2 peers, and it simplifies the code a bit and makes the protocol sensibly cleaner Webrtcsink has been refactored a bit to take the new concept into account
…equirement Since clients know from the start their Peer ID it is fine to go ahead and connect as a consumer without prior registration.
- Remove registration messages - Add a setPeerStatus method which lets other peers know about their roles
15f1e8a
to
c886607
Compare
ping @meh |
Thanks for taking the time to refactor in-depth, this new protocol is a clear improvement :) Do you think all four commits are useful to have in the history, or should we fixup some or all of them? |
I'm OK with the changes btw |
I think they make sense, I ended up reworking the history in a way that made sense to me. If you want it some other way, please let me know. |
I didn't look at how the individual commits were split up tbh, if you say the split up makes sense let's go for it :) |
Thanks :) |
See commit messages.
Includes #73 to avoid conflicts