[#HTTPRemoteClient]
= HTTPRemoteClient
:mrdocs:

A connected HTTP client, holding its socket plus the receive and send buffers&period;

== Synopsis

Declared in `&lt;httpserver&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class HTTPRemoteClient;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:HTTPRemoteClient/2constructor-01.adoc[`HTTPRemoteClient`]         [.small]#[constructor]#
| Constructors
| xref:HTTPRemoteClient/operator_assign.adoc[`operator&equals;`]  [.small]#[deleted]#
| Deleted copy assignment&semi; clients are only used through shared pointers&period;
| xref:HTTPRemoteClient/GetOrigin.adoc[`GetOrigin`] 
| Returns the cached origin string of the connected peer&period;
| xref:HTTPRemoteClient/GetPeer.adoc[`GetPeer`] 
| Returns the address of the connected peer&period;
| xref:HTTPRemoteClient/GetRecvBuffer.adoc[`GetRecvBuffer`] 
| Used for tests&period; @&lcub; Read the client&apos;s receive buffer&period;
| xref:HTTPRemoteClient/GetRequest.adoc[`GetRequest`] 
| Access the request currently being parsed&period;
| xref:HTTPRemoteClient/GetSock.adoc[`GetSock`] 
| Returns the client&apos;s underlying socket&period;
| xref:HTTPRemoteClient/MaybeDisconnect.adoc[`MaybeDisconnect`] 
| Flag the client for disconnection if it is idle past the timeout or a global disconnect is requested&period;
| xref:HTTPRemoteClient/MaybeSendBytesFromBuffer.adoc[`MaybeSendBytesFromBuffer`] 
| Push data (if there is any) from client&apos;s m&lowbar;send&lowbar;buffer to the connected socket&period;
| xref:HTTPRemoteClient/ReadyToSend.adoc[`ReadyToSend`] 
| Returns whether the client has response data ready to send&period;
| xref:HTTPRemoteClient/Receive.adoc[`Receive`] 
| Read available bytes from the socket into the receive buffer&period;
| xref:HTTPRemoteClient/Send.adoc[`Send`] 
| Queue a response to be written to the client&apos;s socket&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:HTTPRemoteClient/TryReadRequest.adoc[`TryReadRequest`] 
| Try to read an HTTPRequest from a client&apos;s receive buffer&period; Only complete requests are returned, incomplete requests are left in the buffer to wait for more data&period; Some read errors will mark this client for disconnection&period;
|===


== Protected Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:HTTPRemoteClient/MutateRecvBuffer.adoc[`MutateRecvBuffer`] 
| Used for tests&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
