5#ifdef FASTLED_HAS_NETWORKING
19struct ServerClientConnection {
20 asio::ip::tcp::socket socket;
21 HttpConnection connection;
26 : connection(ConnectionConfig())
31 ServerClientConnection(ServerClientConnection&& other)
FL_NO_EXCEPT
33 , connection(other.connection)
34 , clientId(other.clientId)
38 ServerClientConnection& operator=(ServerClientConnection&& other)
FL_NO_EXCEPT {
41 connection = other.connection;
42 clientId = other.clientId;
48 ServerClientConnection(
const ServerClientConnection&)
FL_NO_EXCEPT =
delete;
49 ServerClientConnection& operator=(
const ServerClientConnection&)
FL_NO_EXCEPT =
delete;
54class NativeHttpServer {
57 NativeHttpServer(u16 port,
const ConnectionConfig& config = ConnectionConfig())
FL_NO_EXCEPT;
61 NativeHttpServer(const NativeHttpServer&)
FL_NO_EXCEPT = delete;
62 NativeHttpServer& operator=(const NativeHttpServer&)
FL_NO_EXCEPT = delete;
91 asio::ip::tcp::acceptor& acceptorRef()
FL_NO_EXCEPT {
return mAcceptor; }
92 const asio::ip::tcp::acceptor& acceptorRef() const
FL_NO_EXCEPT {
return mAcceptor; }
96 asio::ip::tcp::acceptor mAcceptor;
99 ConnectionConfig mConfig;
100 fl::vector<ServerClientConnection> mClients;
107 ServerClientConnection* findClient(u32 clientId)
FL_NO_EXCEPT;
108 const ServerClientConnection* findClient(u32 clientId) const
FL_NO_EXCEPT;
110 bool isSocketConnected(const asio::ip::tcp::socket& sock) const
FL_NO_EXCEPT;
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Base definition for an LED controller.