DIRECTORY Arpa USING [Address, nullAddress], ArpaUDP USING [nullPort, Port], SunRPC ; SunRPCOnUDP: CEDAR DEFINITIONS ~ { Address: TYPE ~ Arpa.Address; nullAddress: Address ~ Arpa.nullAddress; Port: TYPE ~ ArpaUDP.Port; nullPort: Port ~ ArpaUDP.nullPort; Handle: TYPE ~ SunRPC.Handle; Conversation: TYPE ~ SunRPC.Conversation; Server: TYPE ~ SunRPC.Server; Create: PROC [remoteAddress: Address ¬ nullAddress, remotePort: Port ¬ nullPort] RETURNS [h: Handle]; GetRemote: PROC [h: Handle] RETURNS [remoteAddress: Address, remotePort: Port]; SetRemote: PROC [h: Handle, remoteAddress: Address, remotePort: Port] RETURNS [newH: Handle]; GetReplyAddress: PROC [h: Handle] RETURNS [remoteAddress: Address, remotePort: Port]; OpenReader: PROC [block: REF TEXT] RETURNS [h: Handle]; OpenWriter: PROC [maxBytes: CARDINAL] RETURNS [h: Handle]; TextFromWriter: PROC [h: Handle] RETURNS [output: REF TEXT]; ServerProc: TYPE ~ SunRPC.ServerProc; CreateServer: PROC [pgm, version: CARD, serverProc: ServerProc, port: Port ¬ nullPort, concurrency: CARDINAL ¬ 1, clientData: REF ¬ NIL] RETURNS [s: Server]; GetServerPort: PROC [s: Server] RETURNS [port: Port]; }... œ SunRPCOnUDP.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Demers, September 20, 1987 11:59:44 am PDT For Cedar10.0 Chauser, January 7, 1992 11:15 am PST Types Client Handles SunRPC Create a client handle, from which RPC calls can be made. h.flavor will be $UDP. Get the remote address associated with a client handle. Create a client handle, from which RPC calls can be made. Flavor must be $UDP. Set the remote address associated with a client handle: applicable to $UDP - flavor handles only Gets the remote address associated with the last return from SunRPC.SendCallAndReceiveReply or SunRPC.ReceiveAnotherReply. Readers / Writers: Marshalling and Unmarshalling to/from memory A reader handle allows deserializing data from a REF TEXT block. Flavor is $reader A writer handle allows serializing data into a REF TEXT block. Flavor is $writer Returns the contents written so far on the writer. Flavor must be $writer. Clients Server Registration On entry, h is ready to get the arguments with SunRPC.GetXXX[h]. If doReply=FALSE, no reply message will be sent. The value of replyTimeToLive is the number of seconds the reply message will be kept around by the SunRPCOnUDP package for duplicate handling. Register serverProc as server for this program / version. The concurrency arg is the max number of concurrent calls that will be serviced. Determine the port on which server is listening. Κ1–(cedarcode) style•NewlineDelimiter ™code™Kšœ Οeœ1™žœžœžœžœ ˜Kšœ9™9K™PK˜—šŸ œžœ žœ˜5K™0K™——K˜——…—ˆ U