scws

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const RemoteInputQueueSize = 100
View Source
const WSStatePacketChSize = 20

Variables

View Source
var RemoteInputMapQueue *mapqueue.MapQueue

Functions

This section is empty.

Types

type WSState

type WSState struct {
	Lock          *sync.Mutex
	ClientId      string
	ConnectTime   time.Time
	Shell         *wsshell.WSShell
	UpdateCh      chan scbus.UpdatePacket
	UpdateQueue   []any
	Authenticated bool
	AuthKey       string

	SessionId string
	ScreenId  string
}

func MakeWSState

func MakeWSState(clientId string, authKey string) *WSState

func (*WSState) GetConnectTime

func (ws *WSState) GetConnectTime() time.Time

func (*WSState) GetShell

func (ws *WSState) GetShell() *wsshell.WSShell

func (*WSState) IsAuthenticated

func (ws *WSState) IsAuthenticated() bool

func (*WSState) ReplaceShell

func (ws *WSState) ReplaceShell(shell *wsshell.WSShell)

func (*WSState) RunUpdates

func (ws *WSState) RunUpdates(updateCh chan scbus.UpdatePacket)

func (*WSState) RunWSRead

func (ws *WSState) RunWSRead()

func (*WSState) SetAuthenticated

func (ws *WSState) SetAuthenticated(authVal bool)

func (*WSState) UnWatchScreen

func (ws *WSState) UnWatchScreen()

func (*WSState) UpdateConnectTime

func (ws *WSState) UpdateConnectTime()

func (*WSState) WatchScreen

func (ws *WSState) WatchScreen(sessionId string, screenId string)

func (*WSState) WriteUpdate

func (ws *WSState) WriteUpdate(update any) error

Jump to

Keyboard shortcuts

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