Skip to content

Conversation

@tomaka
Copy link
Member

@tomaka tomaka commented Sep 5, 2018

Based on top of #458

Adds an abstract implementation of MuxedTransport, so that we can put a transport in a Box-like structure.

@tomaka tomaka mentioned this pull request Sep 5, 2018
@tomaka tomaka force-pushed the boxed-transport branch 2 times, most recently from dcb2354 to ebdcffb Compare September 6, 2018 07:57
@tomaka
Copy link
Member Author

tomaka commented Sep 6, 2018

The test failure doesn't really make sense.

@tomaka tomaka requested a review from twittner September 6, 2018 14:07
fn listen_on(&self, addr: Multiaddr) -> Result<(Listener<O>, Multiaddr), Multiaddr>;
fn dial(&self, addr: Multiaddr) -> Result<Dial<O>, Multiaddr>;
fn nat_traversal(&self, server: &Multiaddr, observed: &Multiaddr) -> Option<Multiaddr>;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this trait?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the same as Transport, but since it doesn't have associated types and doesn't take by ownership, it can be put in a Box.

@tomaka tomaka merged commit 381c071 into libp2p:master Sep 6, 2018
@tomaka tomaka deleted the boxed-transport branch September 6, 2018 14:59
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

Successfully merging this pull request may close these issues.

2 participants