evbuffer_peek

Function to peek at data inside an evbuffer without removing it or copying it out.

Pointers to the data are returned by filling the 'vec_out' array with pointers to one or more extents of data inside the buffer.

The total data in the extents that you get back may be more than you requested (if there is more data last extent than you asked for), or less (if you do not provide enough evbuffer_iovecs, or if the buffer does not have as much data as you asked to see).

@param buffer the evbuffer to peek into, @param len the number of bytes to try to peek. If negative, we will try to fill as much of vec_out as we can. @param start_at an evbuffer_ptr indicating the point at which we should start looking for data. NULL means, "At the start of the buffer." @param vec_out an array of evbuffer_iovec @param n_vec the length of vec_out. If 0, we only count how many extents would be necessary to point to the requested amount of data. @return The number of extents needed. This may be less than n_vec if we didn't need all the evbuffer_iovecs we were given, or more than n_vec if we would need more to return all the data that was requested.

extern (C) nothrow
int
evbuffer_peek

Meta