client

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(self plan.PeerID, useUnixSock bool) *Client

func (*Client) GetEgressRates added in v0.2.3

func (c *Client) GetEgressRates(addrs []plan.NetAddr) []float64

func (*Client) Ping

func (c *Client) Ping(target plan.PeerID) (time.Duration, error)

func (*Client) ResetConnections

func (c *Client) ResetConnections(keeps plan.PeerList, token uint32)

func (*Client) Send

func (c *Client) Send(a plan.Addr, buf []byte, t connection.ConnType, flags uint32) error

Send sends data in buf to given Addr

func (*Client) Wait added in v0.2.3

func (c *Client) Wait(ctx context.Context, target plan.PeerID) (int, bool)

Wait waits a peer until it's accessible

Jump to

Keyboard shortcuts

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