Home

Traffic Server Software Developers Kit

INKIOBufferWaterMarkSet

Sets the current watermark for the specified buffer.

Prototype

INKReturnCode INKIOBufferWaterMarkSet (INKIOBuffer bufp,int water_mark)

Arguments

INKIOBuffer bufp is the IOBuffer whose watermark is to be set.

int water_mark is the watermark value to set for bufp.

Description

Sets the current watermark of the specified buffer.

A water mark applies only to a NetVConnection and should therefore be used only when reading data from one. When the watermark is set to N and after INKVConnRead is called, the net processor calls back the reader (with an event INK_VCONN_READ_READY) only when at least N bytes of data are available for reading.

Returns

INK_SUCCESS if the operation completes successfully.

INK_ERROR if an error occurs while calling the API or if an argument is invalid.