From 1092414cf94dd81988c4d69bd756210517264c48 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 18 Oct 2021 14:34:50 +0200 Subject: [PATCH] remove the ConnHandler (#214) --- network/network.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/network/network.go b/network/network.go index 968a390..a2ed8d7 100644 --- a/network/network.go +++ b/network/network.go @@ -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 @@ -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)