-- File: PupPktDefs.Mesa, Last Edit: HGM November 1, 1979 11:57 PM
-- Copyright Xerox Corporation 1979, 1980
DIRECTORY
PupStream: FROM "PupStream" USING [PupListener, PupOpenMode],
PupDefs: FROM "PupDefs" USING [Byte, PupBuffer, Tocks],
PupTypes: FROM "PupTypes" USING [Pair, PupAddress, PupSocketID];
PupPktDefs: DEFINITIONS =
BEGIN
-- Packet Stream Interface
PupPktStreamCreate: PROCEDURE [remote: PupTypes.PupAddress, ticks: PupDefs.Tocks]
RETURNS [PupPktStream];
PupPktStreamMake: PROCEDURE [
local: PupTypes.PupSocketID, remote: PupTypes.PupAddress, ticks: PupDefs.Tocks,
mode: PupStream.PupOpenMode, id: PupTypes.Pair]
RETURNS [PupPktStream];
PupPktStreamDestroy: PROCEDURE [PupPktStream];
PupPktStream: TYPE = POINTER TO PupPktStreamObject;
PupPktStreamObject: TYPE = RECORD [
put: PROCEDURE [PupDefs.PupBuffer],
putMark: PROCEDURE [PupDefs.Byte],
get: PROCEDURE RETURNS [PupDefs.PupBuffer], -- if none, wait, then return NIL
sendAttention: PROCEDURE,
waitForAttention: PROCEDURE,
getSenderSizeLimit: PROCEDURE RETURNS[CARDINAL],
getLocalAddress: PROCEDURE RETURNS [PupTypes.PupAddress] ];
-- Listeners
PupListener: TYPE = PupStream.PupListener;
CreatePupPktStreamListener: PROCEDURE [
local: PupTypes.PupSocketID,
proc: PROCEDURE[PupPktStream,PupTypes.PupAddress],
ticks: PupDefs.Tocks,
filter: PROCEDURE [PupTypes.PupAddress] ← DontReject ]
RETURNS [PupListener];
DestroyPupListener: PROCEDURE [PupListener];
DontReject: PROCEDURE [PupTypes.PupAddress];
RejectThisRequest: ERROR [error: STRING];
END.