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

Network notifiee callbacks #90

Open
mhchia opened this issue Mar 20, 2019 · 1 comment
Open

Network notifiee callbacks #90

mhchia opened this issue Mar 20, 2019 · 1 comment

Comments

@mhchia
Copy link
Contributor

mhchia commented Mar 20, 2019

I'm thinking if it makes sense to let the daemon register a network notifiee which has both Connected and Disconnected exposed to the clients in some way(e.g. through the socket which the client is listening). It will allow the clients to be called back right after connected and disconnected events. This is not necessary because we can do it through polling with list_peers.

The advantage I can think of now is we can perform handshaking or blacklist checking right after connecting, and be updated when peers have disconnected. The drawback is that it incurs additional complexity to do the callbacks in both the daemon and client.

@vyzo
Copy link
Collaborator

vyzo commented Mar 20, 2019

Yeah, connection notifications are probably very useful. We can add a relevant interface, although it is a little complex to implement.

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

2 participants