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

RFC: Robust stable connection. #8

Open
sunhuachuang opened this issue Nov 11, 2020 · 0 comments
Open

RFC: Robust stable connection. #8

sunhuachuang opened this issue Nov 11, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@sunhuachuang
Copy link
Member

Now stable has two connect type.

  • Direct (EndpointStream) - listen the transport's stream. like Tcpstream.
  • Relay (SessionSend) - use other session's channel address as endpoint.

If listen, need handle two way.

  • build stable connection table, add other connect type and keep stable connect the remote peer. (by relay).
  • If current connection is lost, use other channel to it. and then rebuild stable connection table.

If lost connection.

  • If now is Directly, reconnect. (if not ok, change to Relay way.).
  • If now is Relay, if relay session is closed, choose other closest peer in DHT and send Ping to check.
@sunhuachuang sunhuachuang changed the title RFC: Stable Robust listener. RFC: Robust stable connection. Nov 11, 2020
@sunhuachuang sunhuachuang added the enhancement New feature or request label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant