HTTPRemoteClient::TryReadRequest

Try to read an HTTPRequest from a client's receive buffer. Only complete requests are returned, incomplete requests are left in the buffer to wait for more data. Some read errors will mark this client for disconnection.

Synopsis

Declared in <httpserver.h>

static
std::unique_ptr<HTTPRequest>
TryReadRequest(std::shared_ptr<HTTPRemoteClient> const& client);

Return Value

The parsed request, or nullptr if no complete request is available yet.

Parameters

NameDescription
clientThe client whose receive buffer is read from.