Skip to content

idiomatic way to trigger file requests after dial is complete #4910

Answered by thomaseizinger
snowmead asked this question in Q&A
Discussion options

You must be logged in to vote

I pass in any multiaddr (expecting this protocol "/ip4/.../tcp/.../p2p/...")

The part at after /p2p is the PeerId, so you can extract it from there :)

You can add this address first using add_address to keep it around and then send requests to the PeerId and request-response will use the (and other addresses) to make a new connection.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@snowmead
Comment options

@thomaseizinger
Comment options

Answer selected by snowmead
@snowmead
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants