Skip to content

Can I use MemoryTransport with SwarmBuilder::with_other_transport ? #5789

Answered by Velnbur
Velnbur asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, I figured it out. I needed to specify both multiplexer and authentication, like with_tcp does:

            .with_other_transport(|keys| {
                MemoryTransport::new()
                    .upgrade(libp2p::core::upgrade::Version::V1)
                    .authenticate(noise::Config::new(keys).unwrap())
                    .multiplex(yamux::Config::default())
                    .map(|(p, c), _| (p, StreamMuxerBox::new(c)))
            })

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Velnbur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant