gmkcp

package
v0.0.0-...-047dcd9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT 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
}

mkcp client

func Dial

func Dial(raddr string) (*Client, error)

Create new client connection and dial

func (*Client) Close

func (c *Client) Close() error

func (*Client) LocalAddr

func (c *Client) LocalAddr() net.Addr

func (*Client) Read

func (c *Client) Read(b []byte) (n int, err error)

func (*Client) RemoteAddr

func (c *Client) RemoteAddr() net.Addr

func (*Client) SetDeadline

func (c *Client) SetDeadline(t time.Time) error

func (*Client) SetReadDeadline

func (c *Client) SetReadDeadline(t time.Time) error

func (*Client) SetWriteDeadline

func (c *Client) SetWriteDeadline(t time.Time) error

func (*Client) State

func (c *Client) State() int

func (*Client) Write

func (c *Client) Write(b []byte) (n int, err error)

type Server

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

mkcp server

func Listen

func Listen(listenAddr string) (*Server, error)

func (*Server) Accept

func (s *Server) Accept() (net.Conn, error)

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Close

func (s *Server) Close() error

func (*Server) GetActiveConnCount

func (s *Server) GetActiveConnCount() int

Jump to

Keyboard shortcuts

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