gecko/network/handler.go

15 lines
408 B
Go
Raw Normal View History

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
// 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
}