Crashpad
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Loading...
Searching...
No Matches
crashpad::StringHTTPBodyStream Class Reference

An implementation of HTTPBodyStream that turns a fixed string into a stream. More...

#include "util/net/http_body.h"

Inheritance diagram for crashpad::StringHTTPBodyStream:
[legend]
Collaboration diagram for crashpad::StringHTTPBodyStream:
[legend]

Public Member Functions

 StringHTTPBodyStream (const std::string &string)
 Creates a stream with the specified string.
 
 StringHTTPBodyStream (const StringHTTPBodyStream &)=delete
 
StringHTTPBodyStreamoperator= (const StringHTTPBodyStream &)=delete
 
FileOperationResult GetBytesBuffer (uint8_t *buffer, size_t max_len) override
 Copies up to max_len bytes into the user-supplied buffer.
 

Detailed Description

An implementation of HTTPBodyStream that turns a fixed string into a stream.

Constructor & Destructor Documentation

◆ StringHTTPBodyStream()

crashpad::StringHTTPBodyStream::StringHTTPBodyStream ( const std::string & string)
explicit

Creates a stream with the specified string.

Parameters
[in]stringThe string to turn into a stream.

Member Function Documentation

◆ GetBytesBuffer()

FileOperationResult crashpad::StringHTTPBodyStream::GetBytesBuffer ( uint8_t * buffer,
size_t max_len )
overridevirtual

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.

Implements crashpad::HTTPBodyStream.


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