dcrd/connmgr
Wisdom Arerosuoghene bb830e670f
multi: CancelPending error for no pending conns.
This modifies the CancelPending method of the connection manager to
return an error when there are no pending connections for the provided
address or the connection manager is already shutting down.

This change, in turn, ensures that attempts to remove a pending
connection that doesn't exist via RPC returns an error as expected.
2020-05-06 13:30:43 -05:00
..
connmanager_test.go connmgr: Add test for connect context cancel. 2020-05-04 21:25:44 -05:00
connmanager.go multi: CancelPending error for no pending conns. 2020-05-06 13:30:43 -05:00
doc.go connmgr: Refactor connection management into pkg 2017-03-21 19:42:19 -05:00
dynamicbanscore_test.go connmgr: Fix dynamic ban score stringer deadlock. 2020-03-09 14:31:44 -05:00
dynamicbanscore.go connmgr: Fix dynamic ban score stringer deadlock. 2020-03-09 14:31:44 -05:00
go.mod connmgr: Rework HTTPS seeding. 2020-05-04 22:10:59 -05:00
go.sum connmgr: Prepare v2.1.0. 2019-10-15 13:27:04 -05:00
log.go connmgr: Remove deprecated DisableLog func. 2020-05-04 14:50:10 -05:00
README.md multi: replace godoc.org with pkg.go.dev 2020-02-18 19:35:19 -06:00
seed.go connmgr: Rework HTTPS seeding. 2020-05-04 22:10:59 -05:00
tor.go connmgr: Rename TorLookupIPContext to TorLookupIP. 2020-05-04 21:34:01 -05:00

connmgr

Build Status ISC License Doc

Package connmgr implements a generic Decred network connection manager.

Overview

This package handles all the general connection concerns such as maintaining a set number of outbound connections, sourcing peers, banning, limiting max connections, tor lookup, etc.

The package provides a generic connection manager which is able to accept connection requests from a source or a set of given addresses, dial them and notify the caller on connections. The main intended use is to initialize a pool of active connections and maintain them to remain connected to the P2P network.

In addition the connection manager provides the following utilities:

  • Notifications on connections or disconnections
  • Handle failures and retry new addresses from the source
  • Connect only to specified addresses
  • Permanent connections with increasing backoff retry timers
  • Disconnect or Remove an established connection

Installation and Updating

$ go get -u github.com/decred/dcrd/connmgr

License

Package connmgr is licensed under the copyfree ISC License.