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

Commit

Permalink
remove the ConnHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Sep 8, 2021
1 parent 5f1ff67 commit cf8684f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions 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 cf8684f

Please sign in to comment.