5#ifndef WPINET_HTTPSERVERCONNECTION_H_
6#define WPINET_HTTPSERVERCONNECTION_H_
81 void SendData(std::span<const uv::Buffer> bufs,
bool closeAfter =
false);
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source code
Definition: ThirdPartyNotices.txt:113
HTTP protocol parser.
Definition: HttpParser.h:24
@ kRequest
Definition: HttpParser.h:27
Definition: HttpServerConnection.h:19
HttpServerConnection(std::shared_ptr< uv::Stream > stream)
sig::ScopedConnection m_dataConn
The header reader connection.
Definition: HttpServerConnection.h:141
virtual void BuildCommonHeaders(raw_ostream &os)
Build common response headers.
virtual void SendStaticResponse(int code, std::string_view codeText, std::string_view contentType, std::string_view content, bool gzipped, std::string_view extraHeader={})
Send HTTP response from static data, along with other header information like mimetype.
virtual void SendError(int code, std::string_view message={})
Send error header and message.
virtual ~HttpServerConnection()=default
bool m_acceptGzip
If gzip is an acceptable encoding for responses.
Definition: HttpServerConnection.h:135
uv::Stream & m_stream
The underlying stream for the connection.
Definition: HttpServerConnection.h:138
HttpParser m_request
The HTTP request.
Definition: HttpServerConnection.h:129
void SendData(std::span< const uv::Buffer > bufs, bool closeAfter=false)
Send data to client.
sig::ScopedConnection m_endConn
The end stream connection.
Definition: HttpServerConnection.h:144
virtual void ProcessRequest()=0
Process an incoming HTTP request.
bool m_keepAlive
Whether the connection should be kept alive.
Definition: HttpServerConnection.h:132
virtual void BuildHeader(raw_ostream &os, int code, std::string_view codeText, std::string_view contentType, uint64_t contentLength, std::string_view extra={})
Build HTTP response header, along with other header information like mimetype.
virtual void SendResponse(int code, std::string_view codeText, std::string_view contentType, std::string_view content, std::string_view extraHeader={})
Send HTTP response, along with other header information like mimetype.
sig::Connection m_messageCompleteConn
The message complete connection.
Definition: HttpServerConnection.h:147
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:44
A Connection object allows interaction with an ongoing slot connection.
Definition: Signal.h:198
ScopedConnection is a RAII version of Connection It disconnects the slot from the signal upon destruc...
Definition: Signal.h:257
Stream handle.
Definition: Stream.h:68
basic_string_view< char > string_view
Definition: core.h:520
::uint64_t uint64_t
Definition: Meta.h:58
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18