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

remove the ConnHandler #214

Merged
merged 1 commit into from
Oct 18, 2021
Merged
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
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