8 #ifndef WPIUTIL_WPI_HTTPSERVERCONNECTION_H_
9 #define WPIUTIL_WPI_HTTPSERVERCONNECTION_H_
13 #include "wpi/ArrayRef.h"
14 #include "wpi/HttpParser.h"
15 #include "wpi/StringRef.h"
16 #include "wpi/Twine.h"
17 #include "wpi/uv/Stream.h"
71 const Twine& contentType, uint64_t contentLength,
123 #endif // WPIUTIL_WPI_HTTPSERVERCONNECTION_H_
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
void SendResponse(int code, const Twine &codeText, const Twine &contentType, StringRef content, const Twine &extraHeader=Twine{})
Send HTTP response, along with other header information like mimetype.
bool m_keepAlive
Whether the connection should be kept alive.
Definition: HttpServerConnection.h:115
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:41
void BuildHeader(raw_ostream &os, int code, const Twine &codeText, const Twine &contentType, uint64_t contentLength, const Twine &extra=Twine{})
Build HTTP response header, along with other header information like mimetype.
WPILib C++ utilities (wpiutil) namespace.
Definition: SmallString.h:21
Stream handle.
Definition: Stream.h:68
Definition: HttpServerConnection.h:23
void SendError(int code, const Twine &message=Twine{})
Send error header and message.
virtual void BuildCommonHeaders(raw_ostream &os)
Build common response headers.
uv::Stream & m_stream
The underlying stream for the connection.
Definition: HttpServerConnection.h:118
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
void SendData(ArrayRef< uv::Buffer > bufs, bool closeAfter=false)
Send data to client.
HTTP protocol parser.
Definition: HttpParser.h:25
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:79
HttpParser m_request
The HTTP request.
Definition: HttpServerConnection.h:112
virtual void ProcessRequest()=0
Process an incoming HTTP request.