net

package
v0.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2019 License: ISC Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineMatcherHost added in v0.5.2

func DetermineMatcherHost(matcherHost string) (string, bool, error)

DetermineMatcherHost tries to find the target server to connect to perform the matching session, when the configured host is specified as `host`. This uses DNS requests to consult applicable SRV records to redirect the connection to a specific server. Returns the target host, whether the host was changed due to the presence of an SRV record and any errors that happened.

Note that in case of errors, the original matcherHost is returned.

func FindListeningTCPPorts

func FindListeningTCPPorts() ([]int, error)

FindListeningTCPPorts finds possible tcp ports that are currently opened for listening in the current machine.

func FindListeningWallets

func FindListeningWallets(certFile string, params *chaincfg.Params) ([]string, error)

FindListeningWallets tries to find running wallets on localhost that are using the specified certFile (rpc.cert), have enabled grpc and are running on the specified network.

func IsSubDomain added in v0.5.1

func IsSubDomain(root, subdomain string) bool

IsSubDomain returns true if dst is a subdomain of src. It also returns true if src == dst. Note that this is a very simple string check, without regard for full DNS validation rules.

func RemoveHostPort added in v0.5.0

func RemoveHostPort(host string) string

RemoveHostPort removes the last :.* from the host string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL