PDChatServerStub.mesa
Copyright (C) 1984, Xerox Corporation. All rights reserved.
Michael Plass, September 11, 1984 3:54:15 pm PDT
Last Edited by: Gasbarro June 23, 1986 12:12:36 pm PDT
DIRECTORY PupName, PupStream, PupWKS,
IO, Rope, Stream, PDUser;
PDChatServerStub:
CEDAR PROGRAM
IMPORTS PupName, PupStream, Stream, PDUser
NewConnection: PupStream.ListenerProc =
TRUSTED {
otherGuy: Rope.ROPE ← PupName.AddressToRope[remote];
s: Stream.Handle ← Stream.FromIOStreams[stream, stream];
PDUser.TalkWithUser[s ! PupStream.StreamClosing => CONTINUE];
Stream.Delete[s];
};
pupListener: PupStream.Listener ← PupStream.CreateListener[
local: PupWKS.telnet,
worker: NewConnection,
getTimeout: 60000,
putTimeout: 60000
];
END.