| 57 | }; |
| 58 | |
| 59 | class ChatServer : public CppServer::Asio::SSLServer |
| 60 | { |
| 61 | public: |
| 62 | using CppServer::Asio::SSLServer::SSLServer; |
| 63 | |
| 64 | protected: |
| 65 | std::shared_ptr<CppServer::Asio::SSLSession> CreateSession(const std::shared_ptr<CppServer::Asio::SSLServer>& server) override |
| 66 | { |
| 67 | return std::make_shared<ChatSession>(server); |
| 68 | } |
| 69 | |
| 70 | protected: |
| 71 | void onError(int error, const std::string& category, const std::string& message) override |
| 72 | { |
| 73 | std::cout << "Chat TCP server caught an error with code " << error << " and category '" << category << "': " << message << std::endl; |
| 74 | } |
| 75 | }; |
| 76 | |
| 77 | int main(int argc, char** argv) |
| 78 | { |
nothing calls this directly
no outgoing calls
no test coverage detected