-- Transport Mechanism - DEFS for location of server by client --
-- [Juniper]<DMS>MS>LocateDefs.mesa
-- Andrew Birrell 14-Aug-80 12:06:21 --
DIRECTORY
BodyDefs USING [RName],
PupDefs USING [PupAddress];
LocateDefs: DEFINITIONS =
BEGIN
FoundState: TYPE = {allDown, notFound, found};
FoundServerInfo: TYPE = RECORD [
SELECT t: FoundState FROM
allDown => NULL,
notFound => NULL,
found => [where: PupDefs.PupAddress],
ENDCASE];
FindNearestServer: PROCEDURE [
list: BodyDefs.RName,
accept: PROCEDURE [PupDefs.PupAddress] RETURNS [BOOLEAN]]
RETURNS [FoundServerInfo];
FindLocalServer: PROCEDURE [list, local: BodyDefs.RName] RETURNS [FoundState];
FindRegServer: PROCEDURE [
who: BodyDefs.RName, accept: PROCEDURE [PupDefs.PupAddress] RETURNS [BOOLEAN]]
RETURNS [FoundServerInfo];
AcceptFirst: PROC [PupDefs.PupAddress] RETURNS [BOOLEAN];
-- returns TRUE --
END.