27#ifndef INTERRUPTCHANNELHANDSHAKE_H
28#define INTERRUPTCHANNELHANDSHAKE_H
48 enum class State { pending, accepted, rejected };
57 State
Feed(
const char *data, std::size_t length);
58 State GetState()
const {
return m_state; }
62 static bool ConstantTimeEqual(
const std::string &a,
const std::string &b);
65 std::string m_received;
66 State m_state = State::pending;
Checks the first line a would-be interrupt channel sends.
Definition: InterruptChannelHandshake.h:46
State Feed(const char *data, std::size_t length)
Processes the next length bytes the connection sent.
Definition: InterruptChannelHandshake.cpp:38