libp2p / libp2p/go-libp2p-daemon

Network notifiee callbacks

Open
#90 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
95
Forks
41
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading how the daemon communicates with clients through the socket and how list_peers currently exposes network state. Determine where Connected and Disconnected events are available and how callbacks could be represented for clients. Done would require an agreed design and implementation for both event delivery paths, including handshaking or blacklist checks after connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.