Skip to content

RFC: Robust stable connection. #8

@sunhuachuang

Description

@sunhuachuang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions