LocateServers:
PROC [
remotePgm:
CARD,
-- Courier program number
remotePgmVersion:
CARDINAL,
-- Courier program version number
eachAddress: EachAddressProc,
-- called w/addr of each responding server
socket:
XNS.Socket,
-- destination socket for broadcast
net:
XNS.Net ¬
XNS.broadcastNet,
-- can direct to specific net if desired
maxHops:
CARDINAL ¬ 3,
-- max radius, if broadcast
tryLimit:
CARDINAL ¬ 0
-- don't try more than this; 0 => infinity
];
Locate servers by expanding-ring broadcast. The best address (fewest hops) of each responding server is passed to the callback eachAddress, which can terminate the broadcast by raising an ERROR to be caught by the caller of LocateServers, or by raising StopBroadcast[], which will be caught by LocateServers.
}.