kcp

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: GPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKCPDialer

func NewKCPDialer(s string, d proxy.Dialer) (proxy.Dialer, error)

NewKCPDialer returns a kcp proxy dialer.

func NewKCPServer

func NewKCPServer(s string, p proxy.Proxy) (proxy.Server, error)

NewKCPServer returns a kcp proxy server.

Types

type KCP

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

KCP struct.

func NewKCP

func NewKCP(s string, d proxy.Dialer, p proxy.Proxy) (*KCP, error)

NewKCP returns a kcp proxy struct.

func (*KCP) Addr

func (s *KCP) Addr() string

Addr returns forwarder's address.

func (*KCP) Dial

func (s *KCP) Dial(network, addr string) (net.Conn, error)

Dial connects to the address addr on the network net via the proxy.

func (*KCP) DialUDP

func (s *KCP) DialUDP(network, addr string) (net.PacketConn, error)

DialUDP connects to the given address via the proxy.

func (*KCP) ListenAndServe

func (s *KCP) ListenAndServe()

ListenAndServe listens on server's addr and serves connections.

func (*KCP) Serve

func (s *KCP) Serve(c net.Conn)

Serve serves connections.

Jump to

Keyboard shortcuts

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