TerminalMultiServing.Mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Last tweaked by Mike Spreitzer on February 6, 1992 5:40 pm PST
DIRECTORY
IO USING [STREAM],
NetAddressing USING [Address, nullAddress],
Rope USING [ROPE];
TerminalMultiServing: CEDAR DEFINITIONS = {
ROPE: TYPE ~ Rope.ROPE;
Host: TYPE ~ NetAddressing.Address; --socket is for control protocol
nullHost: Host ~ NetAddressing.nullAddress;
EqualHosts: PROC [Host, Host] RETURNS [BOOL];
EnumerateHosts:
PROC [
PROC [Host]];
What clients, if any, are we being the remote terminal for? No guarantees about whether that clients thinks we're serving it. No guarantees about clients added or removed during the enumeration.
IsHost: PROC [Host] RETURNS [BOOL];
ServeHost:
PROC [Host, Role]
RETURNS [whyNot:
ROPE];
Role: TYPE ~ {primary, secondary};
The primary terminal of a Host provides input and receives output; the secondary terminals only receive output.
DontServeHost: PROC [Host];
ServeNoHosts: PROC;
Interest: TYPE ~ REF InterestPrivate;
InterestPrivate:
TYPE ~
RECORD [
NoteHost: PROC [interest: Interest, addr: Host, isHost: BOOL],
data: REF ANY ¬ NIL];
AddMultiInterest: PROC [Interest];
GetHisTerminal:
PROC [Host]
RETURNS [ok:
BOOL, ans:
ROPE];
Returns, if ok, a formatted TerminalLocation.InstLocation, which is what the client thinks about his terminal; if not ok, ans is why.
GetHisVersions: PROC [Host] RETURNS [ok: BOOL, ans: ROPE];
EqualHostReferents: PROC [key1, key2: REF ANY] RETURNS [BOOL];
HashHostReferent:
PROC [key:
REF
ANY]
RETURNS [
CARDINAL];
Useful for making RefTabs keyed on Hosts.
ViewersWorker: TYPE ~ PROC [in, out: IO.STREAM, host: Host, sessionDescr: ROPE, Push: PushProc];
PushProc: TYPE ~ PROC [IO.STREAM];
SetViewersWorker: PROC [ViewersWorker];
SimpleTerminalWorker: TYPE ~ PROC [in, out: IO.STREAM, remote: Host, sessPort: ROPE] RETURNS [close: BOOL];
SetSimpleTerminalWorker: PROC [SimpleTerminalWorker];
}.