net

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2016 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var STUN_PORT int = 3478
View Source
var STUN_SERVERS []string = []string{
	"stun.ekiga.net",
	"stun.ideasip.com",
	"stun.voiparound.com",
	"stun.voipbuster.com",
	"stun.voipstunt.com",
	"stun.voxgratia.org",
}

Functions

func NATtoString

func NATtoString(i stunlib.NATType) string

func Shuffle

func Shuffle(a []string)

func Stun

func Stun() (int, error)

Types

type MessageRetriever

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

func NewMessageRetriever

func NewMessageRetriever(db repo.Datastore, ctx commands.Context, node *core.IpfsNode, service *service.OpenBazaarService, prefixLen int, sendAck func(peerId string, pointerID peer.ID) error) *MessageRetriever

func (*MessageRetriever) Run

func (m *MessageRetriever) Run()

type NetworkService

type NetworkService interface {
	// Handle incoming streams
	HandleNewStream(s inet.Stream)

	// Send request to a peer and wait for the response
	SendRequest(ctx context.Context, p peer.ID, pmes *pb.Message) (*pb.Message, error)

	// Send a message to a peer without requiring a response
	SendMessage(ctx context.Context, p peer.ID, pmes *pb.Message) error
}

type PointerRepublisher

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

func NewPointerRepublisher

func NewPointerRepublisher(node *core.IpfsNode, database repo.Datastore) *PointerRepublisher

func (*PointerRepublisher) Run

func (r *PointerRepublisher) Run()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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