nat_transport

package module
v0.0.0-...-643a63d Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

memberlist-nat-transport

A transport for memberlist that works behind a NAT using UTP, Yamux, and multistream over a hole punched UDP connection.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NatTransport

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

func NewNatTransport

func NewNatTransport(host string, port int) (*NatTransport, error)

port to config later

func (*NatTransport) Address

func (t *NatTransport) Address() string

func (*NatTransport) DialTimeout

func (t *NatTransport) DialTimeout(addr string, timeout time.Duration) (net.Conn, error)

func (*NatTransport) PacketCh

func (t *NatTransport) PacketCh() <-chan *memberlist.Packet

func (*NatTransport) StreamCh

func (t *NatTransport) StreamCh() <-chan net.Conn

func (*NatTransport) WriteTo

func (t *NatTransport) WriteTo(b []byte, addr string) (time.Time, error)

Jump to

Keyboard shortcuts

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