client

package
v0.0.0-...-981072f Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrClientReadPacket              = errors.New("failed to read packet from connection")
	ErrClientMarshalPacket           = errors.New("failed to marshal packet data")
	ErrClientWritePacket             = errors.New("failed to write packet to connection")
	ErrClientInconsistentWrite       = errors.New("inconsistent data write: bytes written mismatch")
	ErrClientAuthenticationFailed    = errors.New("authentication failed")
	ErrClientInvalidPacketType       = errors.New("invalid packet type received")
	ErrClientUnmarshalResponsePacket = errors.New("failed to unmarshal response packet data")
	ErrClientReadDeadline            = errors.New("failed to set read deadline on connection")
)

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(address string, username string, password string, tls *tls.Config, logger *log.Logger, f *filehandler.Handler) *Client

func (*Client) Auth

func (c *Client) Auth(conn net.Conn, username string, password string) error

Login into the server(send join packet).

func (*Client) Exit

func (c *Client) Exit() error

func (*Client) Run

func (c *Client) Run() error

Jump to

Keyboard shortcuts

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