| 14 | using namespace CppServer::Asio; |
| 15 | |
| 16 | class EchoSession : public SSLSession |
| 17 | { |
| 18 | public: |
| 19 | using SSLSession::SSLSession; |
| 20 | |
| 21 | protected: |
| 22 | void onReceived(const void* buffer, size_t size) override |
| 23 | { |
| 24 | // Resend the message back to the client |
| 25 | SendAsync(buffer, size); |
| 26 | } |
| 27 | |
| 28 | void onError(int error, const std::string& category, const std::string& message) override |
| 29 | { |
| 30 | std::cout << "SSL session caught an error with code " << error << " and category '" << category << "': " << message << std::endl; |
| 31 | } |
| 32 | }; |
| 33 | |
| 34 | class EchoServer : public SSLServer |
| 35 | { |
nothing calls this directly
no outgoing calls
no test coverage detected