include "srv.m" srv:= load Srv Srv->PATH; Srv: module { PATH: con "$Srv"; reads: fn(str: string, off, nbytes: int): (array of byte, string); iph2a: fn(host: string) : list of string; ipn2p: fn(net, service: string) : string; };
reads: fn(str: string, off, nbytes: int):The reads function converts a substring of the given string str into a returned array of byte. The substring is defined by arguments off (offset) and nbytes (length).
(array of byte, string);
iph2a: fn(host: string): list of string;The iph2a function calls the host's gethostbyname function for the argument host. The matching addresses are returned as a list of strings.
ipn2p: fn(net, service: string): string;The ipn2p function calls the host's getservbyname function for the specified network (net) and service name (service). The port number is returned as a string.