Sun Java System Web Server 7.0 Update 4 NSAPI Developer's Guide

write Filter Method

The write filter method is called when a filter or SAF calls the net_write function. Filters that are interested in outgoing data, that is, data sent from the server to a client implement the write filter method.

Typically, the write method will pass data to the next filter by calling net_write(layer->lower, ...). The write method may modify the data before calling net_write. For example, the http-compression filter compresses data before passing it on to the next filter.

If a filter implements the write filter method but does not pass the data to the next layer before returning to its caller, that is, if the filter buffers outgoing data, the filter should also implement the flush method.

For more information, see write() Function in Chapter 6, NSAPI Function and Macro Reference.