Skip to content

Commit

Permalink
remove the ConnHandler (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann authored Oct 18, 2021
1 parent bfef630 commit b9e22b2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions core/network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ type Stat struct {
// streams opened by the remote side.
type StreamHandler func(Stream)

// ConnHandler is the type of function used to listen for
// connections opened by the remote side.
type ConnHandler func(Conn)

// Network is the interface used to connect to the outside world.
// It dials and listens for connections. it uses a Swarm to pool
// connections (see swarm pkg, and peerstream.Swarm). Connections
Expand All @@ -128,10 +124,6 @@ type Network interface {
// remote side. This operation is threadsafe.
SetStreamHandler(StreamHandler)

// SetConnHandler sets the handler for new connections opened by the
// remote side. This operation is threadsafe.
SetConnHandler(ConnHandler)

// NewStream returns a new stream to given peer p.
// If there is no connection to p, attempts to create one.
NewStream(context.Context, peer.ID) (Stream, error)
Expand Down

0 comments on commit b9e22b2

Please sign in to comment.