server

package
v0.0.7-dev Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: ISC Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is a wrapper for p2p server and rpc server

func NewServer

func NewServer(listenAddrs []string, db database.DB, dagParams *dagconfig.Params, interrupt <-chan struct{}) (*Server, error)

NewServer returns a new btcd server configured to listen on addr for the bitcoin network type specified by chainParams. Use start to begin accepting connections from peers.

func (*Server) Start

func (s *Server) Start()

Start begins accepting connections from peers.

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully shuts down the server by stopping and disconnecting all peers and the main listener.

func (*Server) WaitForShutdown

func (s *Server) WaitForShutdown()

WaitForShutdown blocks until the main listener and peer handlers are stopped.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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