Branch: refs/heads/master
  Home:   https://github.com/btcsuite/btcd
  Commit: e8f63bc29550705268b533032ccc2ea24f8c86ba
      
https://github.com/btcsuite/btcd/commit/e8f63bc29550705268b533032ccc2ea24f8c86ba
  Author: Olaoluwa Osuntokun <laol...@gmail.com>
  Date:   2016-11-10 (Thu, 10 Nov 2016)

  Changed paths:
    M config.go
    M connmgr/connmanager.go
    M connmgr/connmanager_test.go
    M server.go

  Log Message:
  -----------
  connmgr: switch to using net.Addr interface throughout for addresses

This commit modifies the `ConnManager` to use the `net.Add` interface
through the package instead of a plain string to represent and
manipulate addresses. This change makes the package much more general as
users of the package can possibly utilize custom implementations of the
`net.Addr` interface to establish connections.

More precisely, the `ConnReq` struct has been modified to use a net.Addr
instance explicitly, and the `DialFunc` type has also been modified to
take a `net.Addr` directly. This latter change gives functions that
adhere to the `DialFunc` type more flexibility as to exactly how the
connection is established.

Additionally, the `connmgr.Config.GetNewAddress` configuration option
now directly returns a `net.Addr. This change allows the `connmgr` to be
decoupled from all DNS queries which allows callers to preferentially
select more secure methods like performing DNS lookups over a Tor proxy.


Reply via email to