Textually #included by:
vc-camera.setl (Section A.4 [vc-camera.setl])
vc-do.setl (Section A.11 [vc-do.setl])
vc-event.setl (Section A.12 [vc-event.setl])
vc-giver.setl (Section A.17 [vc-giver.setl])
vc-httpd.setl (Section A.19 [vc-httpd.setl])
vc-image.setl (Section A.20 [vc-image.setl])
vc-javent.setl (Section A.23 [vc-javent.setl])
vc-mouse.setl (Section A.28 [vc-mouse.setl])
vc-push.setl (Section A.34 [vc-push.setl])
vc-simpler.setl (Section A.40 [vc-simpler.setl])
vc-snap.setl (Section A.41 [vc-snap.setl])
Source code: *
-- Open a TCP server port and publish its availability. The port
-- number will be chosen arbitrarily if not given in portnum:
proc provide_service (serv_name, portnum(*));
const sock = open (str (portnum(1) ? 0), `server-socket');
if sockom then
-- Use hostname in place of `localhost' on a distributed system:
publish_service (serv_name, `localhost', port sock, pid);
end if;
-- If om for non-zero portnum, client may wish to wait and retry:
return sock;
end proc;
-- Publish the availability of a service by registering its name and
-- location:
proc publish_service (serv_name, serv_host, serv_port, serv_pid);
const fd = fileno open (getenv `VC_PUBLISH', `socket');
writea (fd, serv_name, [serv_host, serv_port, serv_pid]);
close (fd);
-- Redundant with the environment variable, for external parties:
putfile (`vc-tcp/'+serv_name, serv_host + `:' + str serv_port);
end proc;