defines a general module interface for byte-stream processing.
This manual page documents how to use the interface, and
by implication how a
module should behave.
There is a different implementation module for each filter type
and algorithm (eg, for compression or line encoding).
All implementations are instances of type
loaded from the Dis file
given in the manual page for each standard filter
(or you can write your own to match this specification).
For details of each existing filter module, see
and following manual pages.
must be called before any other operation of a filter module.
sets the filter going;
can be used to pass any filter-specific information
to the processor.
spawns a new thread to do the processing; it returns
a channel that is used to receive requests from the
The first message sent is always
is the process id of the new process spawned.
Subsequent messages are:
- A request by the filter to fill
The number of bytes that have actually
been placed in the buffer should be sent
If -1 is sent, the filter will terminate.
If the value is 0, the filter will terminate once it has processed
all its input.
contains data from the filter.
Receipt of the the data must be acknowledged
by sending a value on
If the value is -1, the filter will terminate.
- The filter has finished processing.
contains any data that was not consumed
by the filter. The filter terminates after
sending this message.
- This message is used to send a string of
arbitrary information from the filter
during the course of its processing.
- The filter has encountered an error when processing.
is a string describing the error. The filter terminates
after sending this message.