client

package
v0.0.0-...-b4be9a7 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoginInfo

func GetLoginInfo() (string, string, error)

func Run

func Run(cCtx *cli.Context) error

func SendKeepalive

func SendKeepalive(conn *net.UDPConn, addr string) error

Types

type Client

type Client struct {
	Conn   *net.UDPConn
	IPAddr string
	Iface  *water.Interface
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts ...ClientOpt) *Client

func (*Client) CheckAuthed

func (c *Client) CheckAuthed() bool

func (*Client) Close

func (c *Client) Close() error

func (*Client) DoKeepalive

func (c *Client) DoKeepalive(interval int) error

func (*Client) HandleConn

func (c *Client) HandleConn(netToIface chan *packet.VLPkt) error

func (*Client) HandleSignal

func (c *Client) HandleSignal(sigChan chan os.Signal) error

func (*Client) Launch

func (c *Client) Launch() error

func (*Client) SetLogLevel

func (c *Client) SetLogLevel()

type ClientOpt

type ClientOpt func(*Client)

func ClientSetKey

func ClientSetKey(k string) ClientOpt

func ClientSetLogLevel

func ClientSetLogLevel(l string) ClientOpt

func ClientSetPasswd

func ClientSetPasswd(p string) ClientOpt

func ClientSetTarget

func ClientSetTarget(t string) ClientOpt

func ClientSetUser

func ClientSetUser(u string) ClientOpt

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳