SocketInternal.mesa - internal definitions module for Pilot Socket Channels
Copyright © 1985 by Xerox Corporation. All rights reserved.
BLyon on: January 9, 1981 2:50 PM
DIRECTORY
BufferDefs USING [BufferAccessHandle, Queue],
Socket USING [ChannelHandle, State, WaitTime],
NSAddress USING [NetworkAddress];
SocketInternal: DEFINITIONS
SHARES BufferDefs =
BEGIN OPEN Socket;
definitions
SocketHandle: TYPE = REF SocketObject;
SocketObject: TYPE = RECORD [
next: SocketHandle, -- used only by the router
every socket has a buffer pool, which is protected outside the socketRouterLock lock
pool: BufferDefs.BufferAccessHandle,
the buffer pool object if it is a private one
socketRouterLock monitor protected data and condition variables
localAddr: NSAddress.NetworkAddress,
channelState: Socket.State,
waitTime: Socket.WaitTime,
completedUserGetQueue: BufferDefs.Queue,
newUserInput: CONDITION];
interface
exported by SocketImpl.
procedures
SocketHandleToChannelHandle: PROCEDURE [sH: SocketHandle]
RETURNS [ChannelHandle] = INLINE
BEGIN RETURN[LOOPHOLE[sH, ChannelHandle]]; END;
ChannelHandleToSocketHandle: PROCEDURE [cH: ChannelHandle]
RETURNS [SocketHandle] = INLINE BEGIN RETURN[LOOPHOLE[cH, SocketHandle]]; END;
GetBufferPool: PROCEDURE [cH: SocketHandle]
RETURNS [BufferDefs.BufferAccessHandle];
SocketOn: PROCEDURE;
END.
LOG
Time: January 3, 1980 5:58 PM By: Dalal Action: modified interface completely.
Time: March 11, 1980 3:04 PM By: BLyon Action: pendingGetQueue modified to completedUserGetQueue. send, receive (buffer counts) added to create internal. Added GetPacket and PutPacket.
Time: March 18, 1980 1:56 PM By: BLyon Action: Added to/ deleted from socket object.
Time: January 6, 1981 2:21 PM By: BLyon Action: Post Mokelumne rework.