peer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DefaultPort is the port the peer server listens on if not passed in.
	DefaultPort = 3333
	// LbrycrdAddress to be used when paying for data. Not implemented yet.
	LbrycrdAddress = "bJxKvpD96kaJLriqVajZ7SaQTsWWyrGQct"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	StatLogger          *log.Logger   // logger to log stats
	StatReportFrequency time.Duration // how often to log stats
	// contains filtered or unexported fields
}

Server is an instance of a peer server that houses the listener and store.

func NewServer

func NewServer(store store.BlobStore) *Server

NewServer returns an initialized Server pointer.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown gracefully shuts down the peer server.

func (*Server) Start

func (s *Server) Start(address string) error

Start starts the server listener to handle connections.

Jump to

Keyboard shortcuts

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