src/vmm/control.bend checks
raw source on the hub · import 0xec4070cc970212faf4003d589ad8e6c1/src/vmm/control.bend as Control
1 import
import Base
Types
type Cmd source · line 8 · raw
Data
CPauseCmd
CResumeCmd
CStatusCmd
CQuitCmd
CNetCmd
CPowerdownCmd
CSnapshot@path:String -> Cmd
CScreendump@path:String -> Cmd
CType@text:String -> Cmd
CPointer@x:U32 -> @y:U32 -> Cmd
CPointerUsageCmd
CUnknownCmd
CBad@why:String -> Cmd
CStatusJsonCmd
Definitions
def Ctl.usage source · line 24 · raw
String
def Ctl.pointer_usage source · line 27 · raw
String
def Ctl.pointer.mk source · line 31 · raw
@x:Maybe<&2, U32> -> @y:Maybe<&2, U32> -> Cmd
pointer X Y: two numbers on the tablet's 0..32767 scale.
def Ctl.pointer source · line 38 · raw
@ws:List<&2, String> -> Cmd
def Ctl.needs source · line 46 · raw
@+arg:String -> @c:Cmd -> @why:String -> Cmd
A command that takes an argument, given none: its usage.
def Ctl.status_json source · line 50 · raw
@paused:Bool -> String
status json: the VM's state as one JSON object, for programs.
def Ctl.verb source · line 53 · raw
@+verb:String -> @+arg:String -> Cmd
def Ctl.parse source · line 68 · raw
@line:String -> Cmd
One command line: its first word is the verb, the rest (one space between words) its argument.
def Ctl.chars source · line 73 · raw
@bs:List<&2, U32> -> String
Bytes as characters, one per byte (as host/fs.bend's Fs.chars).
def Ctl.frame.got source · line 80 · raw
@+status:U32 -> @+line:List<&2, U32> -> Maybe<&2, Cmd>
def Ctl.frame source · line 87 · raw
@bs:List<&2, U32> -> Maybe<&2, Cmd>
What the host read from a control client (Hvf.ctl_next): [0, a line's bytes...] is a command (an empty line too: it gets the usage), [1, ...] a line cut short, anything else (no control socket) ends the service.