Protocols.Mesa
Last Edited by: Spreitzer, February 19, 1986 9:50:07 pm PST
DIRECTORY IO, Rope;
Protocols: CEDAR DEFINITIONS = {
ROPE: TYPE = Rope.ROPE;
Protocol: TYPE = REF ProtocolRep;
ProtocolRep: TYPE = RECORD [
name: ROPE,
Instantiate: PROC [client: Client, logFileName: ROPENIL] RETURNS [c: Conversant],
StartConnect: PROC [c: Conversant, serverName: ROPE, login: BOOLFALSE],
StartDisconnect: PROC [c: Conversant, verbosely: BOOLTRUE],
GiveUp: PROC [c: Conversant, verbosely: BOOLTRUE],
Aborts while connecting or disconnecting.
SetOnLine: PROC [c: Conversant, onLine: BOOL],
protocolData: REF ANYNIL
];
Client: TYPE = REF ClientPrivate;
ClientPrivate: TYPE = RECORD [
fromClient, toClient: IO.STREAM,
type: ClientType,
clientData: REF ANYNIL
];
ClientType: TYPE = REF ClientTypePrivate;
ClientTypePrivate: TYPE = RECORD [
NoteState: PROC [c: Conversant] ← NIL,
typeData: REF ANYNIL
];
Conversant: TYPE = REF ConversantPrivate;
ConversantPrivate: TYPE = RECORD [
protocol: Protocol,
client: Client,
state: State ← [FALSE, disconnected],
serverName: ROPENIL,
fromServer: IO.STREAMNIL,
conversantData: REF ANYNIL
];
State: TYPE = RECORD [
onLine: BOOL,
connectivity: Connectivity
];
Connectivity: TYPE = {disconnected, connecting, connected, disconnecting};
GetProtocol: PROC [name: ROPE] RETURNS [p: Protocol];
RegProtocol: PROC [p: Protocol];
}.