transport

package
v0.0.0-...-868bdbc Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KCP

type KCP struct {
	DataShards     int
	ParityShards   int
	SendWindowSize int
	RecvWindowSize int
}

KCP represents the KCP transport protocol with its respective configurable options.

func NewKCP

func NewKCP() *KCP

NewKCP instantiates a new instance of the KCP protocol.

func (*KCP) Dial

func (t *KCP) Dial(address string) (net.Conn, error)

Dial dials an address via. the KCP protocol, with optional Reed-Solomon message sharding.

func (*KCP) Listen

func (t *KCP) Listen(port int) (net.Listener, error)

Listen listens for incoming KCP connections on a specified port.

type Layer

type Layer interface {
	Listen(port int) (net.Listener, error)
	Dial(address string) (net.Conn, error)
}

Layer represents a transport protocol layer.

type TCP

type TCP struct {
	WriteBufferSize int
	ReadBufferSize  int
	NoDelay         bool
}

TCP represents the TCP transport protocol alongside its respective configurable options.

func NewTCP

func NewTCP() *TCP

NewTCP instantiates a new instance of the TCP transport protocol.

func (*TCP) Dial

func (t *TCP) Dial(address string) (net.Conn, error)

Dial dials an address via. the TCP protocol.

func (*TCP) Listen

func (t *TCP) Listen(port int) (net.Listener, error)

Listen listens for incoming TCP connections on a specified port.

Jump to

Keyboard shortcuts

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