Austin Schuh | 1e69f94 | 2020-11-14 15:06:14 -0800 | [diff] [blame^] | 1 | /*----------------------------------------------------------------------------*/ |
| 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 | |
| 12 | namespace wpi { |
| 13 | |
| 14 | class 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 |