~/bend-docscommunity

src/vmm/control.bend checks

raw source on the hub · import 0xeedc51d20a9b77c2ac19c4d8f57d45a6/src/vmm/control.bend as Control

1 import
import Base

Types

type Cmd source · line 8 · raw

Data

Definitions

def Ctl.usage source · line 23 · raw

String

def Ctl.pointer_usage source · line 26 · raw

String

def Ctl.pointer.mk source · line 30 · 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 37 · raw

@ws:List<&2, String> -> Cmd

def Ctl.needs source · line 45 · raw

@+arg:String -> @c:Cmd -> @why:String -> Cmd

A command that takes an argument, given none: its usage.

def Ctl.verb source · line 48 · raw

@+verb:String -> @+arg:String -> Cmd

def Ctl.parse source · line 63 · 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 68 · 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 75 · raw

@+status:U32 -> @+line:List<&2, U32> -> Maybe<&2, Cmd>

def Ctl.frame source · line 82 · 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.