client

package
v0.0.0-...-a58af4c Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenForServer

func ListenForServer(conn *websocket.Conn, ioh IOHandler) error

func NewClient

func NewClient(url *url.URL) (*websocket.Conn, error)

Types

type CommandHandler

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

func NewCommandHandler

func NewCommandHandler(ioh IOHandler, conn *websocket.Conn) *CommandHandler

func (*CommandHandler) Handle

func (ch *CommandHandler) Handle(conn *websocket.Conn, packet *c.Packet) error

type IOHandler

type IOHandler interface {
	DisplayMessage(string)
	ReadInput(*string) error
}

type TermHandler

type TermHandler struct {
}

func (*TermHandler) DisplayMessage

func (th *TermHandler) DisplayMessage(msg string)

func (*TermHandler) ReadInput

func (th *TermHandler) ReadInput(buff *string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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