peer

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2018 License: MIT Imports: 13 Imported by: 0

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

func GetBlobHash

func GetBlobHash(blob []byte) string

GetBlobHash returns the sha512 hash hex encoded string of the blob byte slice.

Types

type Server

type Server struct {
	// 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