Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better protocol documentation #23

Open
dominictarr opened this issue Mar 18, 2019 · 1 comment
Open

better protocol documentation #23

dominictarr opened this issue Mar 18, 2019 · 1 comment

Comments

@dominictarr
Copy link
Contributor

trying to add a feature, I found my self forgetting lots of stuff about how the protocol works.
such as: when peers connect, one is the client (who calls), the server is expected to send vector clock (notes) first. the place where this happens looks like this:

  //client should wait for the server notes, so that stream
  //can error before a peer sends a massive handshake.
  if(peer.replicating == null) return state

kinda difficult to understand, not very obvious that peer.replicating being unset means means...
in connect:

    //if we are client, wait until we receive notes to send code.
    //this is a weird way of doing it! shouldn't we just have a bit of state
    //for wether we have received a vector clock
    replicating: ev.client ? null : {}

now I recall, this was a JGIW (just get it working)...

@dominictarr
Copy link
Contributor Author

comment to experiment with github issue flow...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant