<> <> <> <<>> <> DIRECTORY Arpa USING [Address, nullAddress], ArpaUDPBuf USING [Buffer, nullPort, Port] ; ArpaUDP: CEDAR DEFINITIONS ~ { Address: TYPE ~ Arpa.Address; unknownAddress: Address ~ Arpa.nullAddress; Port: TYPE ~ ArpaUDPBuf.Port; nullPort: Port ~ ArpaUDPBuf.nullPort; Buffer: TYPE ~ ArpaUDPBuf.Buffer; Buffers: TYPE ~ ArpaUDPBuf.Buffer; -- Chain of buffers Handle: TYPE ~ REF Object; Object: TYPE; <> Milliseconds: TYPE = CARD; dontWait: Milliseconds = 0; waitForever: Milliseconds = INT.LAST; <> <> Create: PROC [ remoteAddress: Address _ unknownAddress, remotePort: Port _ nullPort, localPort: Port _ nullPort, sendBuffers: CARDINAL _ 1, recvBuffers: CARDINAL _ 5, getTimeout: Milliseconds _ 10000, acceptErrors: BOOL _ FALSE, acceptLongDatagrams: BOOL _ FALSE ] RETURNS [h: Handle]; <> <> <> GetLocalPort: PROC [h: Handle] RETURNS [port: Port]; GetRemoteAddress: PROC [h: Handle] RETURNS [address: Address, port: Port]; SetRemoteAddress: PROC [h: Handle, address: Address, port: Port]; <> <<>> SetGetTimeout: PROC [h: Handle, timeout: Milliseconds]; <> <<>> SetSoftwareChecksumming: PROC [h: Handle, send, recv: BOOL]; < Faster>> <> <> <<>> Kick: PROC [h: Handle]; <> <<>> Destroy: PROC [h: Handle]; <> <> AllocBuffers: PROC [h: Handle, howMany: CARDINAL _ 1] RETURNS [b: Buffers]; <> <> <<>> SetUserBytes: PROC [b: Buffer, bytes: CARDINAL]; <> Put: PROC [b: Buffers]; <> <> <> <> <<>> SetCacheRefresh: PROC [h: Handle, interval: CARDINAL]; <> <> <> <<>> Send: PROC [b: Buffers, address: Address, port: Port]; <> <<>> SendToSelf: PROC [b: Buffers, address: Address, port: Port]; <> <> <<>> ReturnToSender: PROC [b: Buffers]; <> <> <> Get: PROC [h: Handle] RETURNS [b: Buffers]; <> <> <> <<>> CheckError: PROC [h: Handle]; <> <> GetUserBytes: PROC [b: Buffer] RETURNS [bytes: CARDINAL]; <> GetSource: PROC [b: Buffers] RETURNS [address: Address, port: Port]; <> <<>> FreeBuffers: PROC [b: Buffers]; <> <> Error: ERROR [code: ATOM]; <> <<$handleDestroyed : you can't send on a handle after calling Destroy.>> <<$requestTooLarge : AllocBuffer asked for more buffers than were specified in Create.>> <<$badRemoteAddress : attempt to set remote address of handle to broadcast.>> <<$destUnreachable : raised by Put or Send.>> ReceivedError: ERROR [code: ATOM, remoteAddress: Address, remotePort: Port]; <> <<$netUnreachable>> <<$hostUnreachable>> <<$portUnreachable>> <<$mustFragment>> <<$sourceRouteFailure>> <<$timeoutTimeToLive>> <<$timeoutReassembly>> <<$parameterProblem>> <<$sourceQuench>> }.