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

Accept Two Transport Types In Handshaker #124

Open
GGist opened this issue Sep 11, 2017 · 0 comments
Open

Accept Two Transport Types In Handshaker #124

GGist opened this issue Sep 11, 2017 · 0 comments

Comments

@GGist
Copy link
Owner

GGist commented Sep 11, 2017

We should allow users to specify two Transport implementations in the Handshaker, a main transport type, as well as a fallback transport type. For users that just want a main transport type, we would also provide an implementation for a NullTransport, so they can give that as the fallback Transport.

This seems like a common enough feature to warrant built in support for contacting peers over transport A, and if that fails, try connecting to them over transport B. We would also spawn listeners for both transport types.

An alternative to providing this feature at the Handshaker layer is to define compound Transports that can handle this logic transparently. The problems with that are:

  1. We handle connection timeouts at the Handshaker level, the Transport doesnt know about this
  2. We may have to box the return types since different Transports could return different connection objects
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant