include "keyring.m"; keyring := load Keyring Keyring->PATH; getmsg: fn(fd: ref Sys->FD): array of byte; sendmsg: fn(fd: ref Sys->FD, buf: array of byte, n: int): int; senderrmsg: fn(fd: ref Sys->FD, s: string): int;
Each data message is transmitted with a five-byte header containing a four-character zero-padded decimal count n terminated by a newline, followed by n bytes of message data. An error message has a similar structure, except that the first character of the count is replaced by an exclamation mark (!); the message data following contains the diagnostic string in its UTF-8 encoding (see utf(6)).
Getmsg reads the next message from fd and returns its data content.
Sendmsg sends the first n bytes of buf as a message on fd, and returns n.
Senderrmsg sends the error message s.
|KEYRING-GETMSG(2 )||Rev: Thu Feb 15 14:43:27 GMT 2007|