connections

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2015 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnectionSvc

func NewConnectionSvc(cfg *config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *tls.Config, discoverer discover.Finder, relaySvc *relay.Svc,
	bepProtocolName string, tlsDefaultCommonName string, lans []*net.IPNet) suture.Service

Types

type DialerFactory

type DialerFactory func(*url.URL, *tls.Config) (*tls.Conn, error)

type LimitedReader

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

func NewReadLimiter

func NewReadLimiter(r io.Reader, b *ratelimit.Bucket) *LimitedReader

func (*LimitedReader) Read

func (r *LimitedReader) Read(buf []byte) (int, error)

type LimitedWriter

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

func NewWriteLimiter

func NewWriteLimiter(w io.Writer, b *ratelimit.Bucket) *LimitedWriter

func (*LimitedWriter) Write

func (w *LimitedWriter) Write(buf []byte) (int, error)

type ListenerFactory

type ListenerFactory func(*url.URL, *tls.Config, chan<- model.IntermediateConnection)

type Model

type Model interface {
	protocol.Model
	AddConnection(conn model.Connection)
	ConnectedTo(remoteID protocol.DeviceID) bool
	IsPaused(remoteID protocol.DeviceID) bool
}

Jump to

Keyboard shortcuts

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