Sun Java System Web Server 6.1 SP6 NSAPI Programmer's Guide


The writev filter method is called when multiple buffers of output data are to be sent. Filters that modify or consume outgoing data may choose to implement the writev filter method.

If a filter implements the write filter method but not the writev filter method, the server automatically translates net_writev calls to net_write calls. As a result, filters interested in the outgoing data stream do not need to implement the writev filter method. However, for performance reasons, it is beneficial for filters that implement the write filter method to also implement the writev filter method.


int writev(FilterLayer *layer, const struct iovec *iov, int iov_size);


The number of bytes consumed, which may be less than the requested amount if an error occurred.


FilterLayer *layer is the filter layer the filter is installed in.

const struct iovec *iov is an array of iovec structures, each of which contains outgoing data.

int iov_size is the number of iovec structures in the iov array.


int myfilter_writev(FilterLayer *layer, const struct iovec *iov, int iov_size)
    return net_writev(layer->lower, iov, iov_size);

See Also

flush, net_write, write