2020-05-17 20:47:43 -07:00
|
|
|
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
|
|
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
|
|
|
|
package network
|
|
|
|
|
|
|
|
import "github.com/ava-labs/gecko/ids"
|
|
|
|
|
|
|
|
// Handler represents a handler that is called when a connection is marked as
|
2020-05-22 13:04:48 -07:00
|
|
|
// connected or disconnected
|
2020-05-17 20:47:43 -07:00
|
|
|
type Handler interface {
|
|
|
|
// returns true if the handler should be removed
|
|
|
|
Connected(id ids.ShortID) bool
|
|
|
|
Disconnected(id ids.ShortID) bool
|
|
|
|
}
|