Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

emit the EvtPeerConnectednessChanged event #58

Merged
merged 1 commit into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go-libp2p-blankhost
[![Discourse posts](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg)](https://discuss.libp2p.io)


> A very thin implementation of go-libp2p-host. Does not contain any identify, relay, or NAT traversal code.
A very thin implementation of go-libp2p-host. Does not contain any identify, relay, or NAT traversal code.


## Table of Contents
Expand Down
5 changes: 5 additions & 0 deletions blank.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ func NewBlankHost(n network.Network, options ...Option) *BlankHost {
if bh.emitters.evtLocalProtocolsUpdated, err = bh.eventbus.Emitter(&event.EvtLocalProtocolsUpdated{}); err != nil {
return nil
}
evtPeerConnectednessChanged, err := bh.eventbus.Emitter(&event.EvtPeerConnectednessChanged{})
if err != nil {
return nil
}
n.Notify(newPeerConnectWatcher(evtPeerConnectednessChanged))

n.SetStreamHandler(bh.newStreamHandler)

Expand Down
8 changes: 5 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ go 1.16
require (
github.com/ipfs/go-log/v2 v2.3.0
github.com/libp2p/go-eventbus v0.2.1
github.com/libp2p/go-libp2p-core v0.6.0
github.com/multiformats/go-multiaddr v0.2.2
github.com/multiformats/go-multistream v0.1.1
github.com/libp2p/go-libp2p-core v0.11.0
github.com/libp2p/go-libp2p-swarm v0.8.0
github.com/multiformats/go-multiaddr v0.4.0
github.com/multiformats/go-multistream v0.2.1
github.com/stretchr/testify v1.7.0
)
Loading