-- PacketExchangeInternal.mesa (last edited by: BLyon on: January 20, 1981 2:50 PM)(2048)\i3f5bI22f0B5i
DIRECTORY
BufferDefs USING [OisBuffer],
OISCP USING [ReturnFreeOisBuffer],
OISCPTypes USING [ExchangeClientType, WaitTime],
PacketExchange USING [defaultWaitTime, ExchangeHandle],
NSAddress USING [SocketNumber];
PacketExchangeInternal: DEFINITIONS
IMPORTS OISCP =
BEGIN
-- The Packet Exchange Protocol is a request/reply protocol that provides a little more
-- reliability than raw packets transmitetd from a socket, and less reliabilty than the
-- Sequenced Packet Protocol. Usually one end will provide some service at a
-- well known socket or at a network address that is available through a binding
-- process involving the Clearinghouse. The other end acquires a socket and sends a
-- request. The request will be retransmitted a number of times with the interval
-- between retransmissions based on the delay to the remote entity.
-- procedures
Create: PROCEDURE [localSocket: NSAddress.SocketNumber,
receiveRequestCount: CARDINAL ← 1, privateBuffers: BOOLEAN ← TRUE,
waitTime: OISCPTypes.WaitTime ← PacketExchange.defaultWaitTime]
RETURNS [PacketExchange.ExchangeHandle]; -- receiveRequestCount is estimate of number of "to be queued" requests; privateBuffers TRUE mean the buffers will be allocated, FALSE mean buffer will be shared with the system buffer pool.
CreateTypicalServer: PROCEDURE [localSocket: NSAddress.SocketNumber,
privateBuffers: BOOLEAN ← FALSE] RETURNS [PacketExchange.ExchangeHandle] = INLINE
{RETURN[Create[localSocket, 2, privateBuffers]]};
CreateTypicalUser: PROCEDURE [localSocket: NSAddress.SocketNumber]
RETURNS [PacketExchange.ExchangeHandle] = INLINE
{RETURN[Create[localSocket, 1, TRUE]]};
Delete: PROCEDURE [PacketExchange.ExchangeHandle];
-- in SendRequestPacket, user is responsible for requestB and replyB when not NIL;
-- the user CANNOT depend on the value of requestB.requeueProcedure!!
SendRequestPacket: PROCEDURE [h: PacketExchange.ExchangeHandle,
requestB: BufferDefs.OisBuffer,
replyFilter: OISCPTypes.ExchangeClientType ← unspecified]
RETURNS [replyB: BufferDefs.OisBuffer];
WaitForRequestPacket: PROCEDURE [h: PacketExchange.ExchangeHandle,
request: OISCPTypes.ExchangeClientType ← unspecified]
RETURNS [requestB: BufferDefs.OisBuffer];
-- in SendReplyPacket, caller loses ownership of replyB (he can get it back via
-- replyB.requeueProcedure
SendReplyPacket: PROCEDURE [h: PacketExchange.ExchangeHandle, replyB: BufferDefs.OisBuffer];
GetFreeSendPacket: PROCEDURE [h: PacketExchange.ExchangeHandle] RETURNS [BufferDefs.OisBuffer];
ReturnFreeSendPacket: PROCEDURE [b: BufferDefs.OisBuffer] = INLINE
{OISCP.ReturnFreeOisBuffer[b]};
END.\228b22B41i572t10 14bI6B26t0 14t10 51t0 14t10 18t0 64t10 13t0 29t10 1t0 1i4t10 19t0 170I1t10b19B26t0 14t10 16t0 14t10 28t0 29t10 44t0 14t10 4t0i1t10I1b17B26t0 14t10 25t0 29t10 45t0 4t10 6b6B13t0 29t10 1t0 156b17B186b20B259b15B81b17B85b20B84i1I
LOG
Time: October 23, 1980 1:50 PM By: Dalal Action: created file.
Time: January 13, 1981 5:30 PM By: BLyon Action: moved to Pilot Communication.
\1i