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

Disconnect from peer. #22

Closed
cheatfate opened this issue Nov 15, 2018 · 5 comments
Closed

Disconnect from peer. #22

cheatfate opened this issue Nov 15, 2018 · 5 comments
Assignees

Comments

@cheatfate
Copy link

I see here present connect(peer, addresses) and recently added feature trim() (which drops connections to all connected peers), but i don't see any ability to disconnect from particular peer. Is this feature is missing or not needed?

@vyzo
Copy link
Collaborator

vyzo commented Nov 16, 2018

You can use Host.Network().ClosePeer(id).

@raulk
Copy link
Member

raulk commented Nov 16, 2018

@vyzo I think OP means exposing DISCONNECT from the daemon?

@cheatfate
Copy link
Author

I'm making client for go-libp2p-daemon and i know how to DISCONNECT from daemon. I'm talking about how to ask go-libp2p-daemon to disconnect from specific peer.

@vyzo
Copy link
Collaborator

vyzo commented Nov 16, 2018

Oh, ok. Yeah, we can expose that method through the API to allow peer disconnects.

@vyzo
Copy link
Collaborator

vyzo commented Nov 16, 2018

I think we can add it to the connection manager api, even though it is not technically part of the connection manager.

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

No branches or pull requests

3 participants