blob: 8022cae6dccf54a3101e11c176f75808a5268ef6 [file] [log] [blame]
Austin Schuh1e69f942020-11-14 15:06:14 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) 2020 FIRST. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#include "wpi/HttpWebSocketServerConnection.h" // NOLINT(build/include_order)
9
10#include <gtest/gtest.h>
11
12namespace wpi {
13
14class HttpWebSocketServerConnectionTest
15 : public HttpWebSocketServerConnection<HttpWebSocketServerConnectionTest> {
16 public:
17 HttpWebSocketServerConnectionTest(std::shared_ptr<uv::Stream> stream,
18 ArrayRef<StringRef> protocols)
19 : HttpWebSocketServerConnection{stream, protocols} {}
20
21 void ProcessRequest() override { ++gotRequest; }
22 void ProcessWsUpgrade() override { ++gotUpgrade; }
23
24 int gotRequest = 0;
25 int gotUpgrade = 0;
26};
27
28} // namespace wpi