Crashpad
Public Member Functions | List of all members
crashpad::HTTPBodyStream Class Referenceabstract

An interface to a stream that can be used for an HTTP request body. More...

#include "util/net/http_body.h"

Inheritance diagram for crashpad::HTTPBodyStream:
crashpad::CompositeHTTPBodyStream crashpad::FileReaderHTTPBodyStream crashpad::GzipHTTPBodyStream crashpad::StringHTTPBodyStream

Public Member Functions

virtual FileOperationResult GetBytesBuffer (uint8_t *buffer, size_t max_len)=0
 Copies up to max_len bytes into the user-supplied buffer. More...
 

Detailed Description

An interface to a stream that can be used for an HTTP request body.

Member Function Documentation

◆ GetBytesBuffer()

virtual FileOperationResult crashpad::HTTPBodyStream::GetBytesBuffer ( uint8_t *  buffer,
size_t  max_len 
)
pure virtual

Copies up to max_len bytes into the user-supplied buffer.

Parameters
[out]bufferA user-supplied buffer into which this method will copy bytes from the stream.
[in]max_lenThe length (or size) of buffer. At most this many bytes will be copied.
Returns
On success, a positive number indicating the number of bytes actually copied to buffer. On failure, a negative number. When the stream has no more data, returns 0.

Implemented in crashpad::CompositeHTTPBodyStream, crashpad::FileReaderHTTPBodyStream, crashpad::StringHTTPBodyStream, and crashpad::GzipHTTPBodyStream.


The documentation for this class was generated from the following file: