1
0
forked from blue/pica
pica/handler/poll.h

33 lines
595 B
C++

//SPDX-FileCopyrightText: 2023 Yury Gubich <blue@macaw.me>
//SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "handler.h"
#include "request/request.h"
#include "response/response.h"
class Server;
namespace Handler {
class Poll : public Handler {
public:
Poll(Server* server);
void handle(Request& request) override;
enum class Result {
success,
tokenProblem,
replace,
timeout,
unknownError
};
static void error(Request& request, Result result, Response::Status status);
private:
Server* server;
};
}