diff options
Diffstat (limited to 'src/identd/identd_socket.hpp')
-rw-r--r-- | src/identd/identd_socket.hpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/identd/identd_socket.hpp b/src/identd/identd_socket.hpp new file mode 100644 index 0000000..6d6cc1d --- /dev/null +++ b/src/identd/identd_socket.hpp @@ -0,0 +1,44 @@ +#pragma once + +#include <network/socket_handler.hpp> + +#include <cassert> +#include <network/tcp_socket_handler.hpp> + +#include <logger/logger.hpp> +#include <xmpp/biboumi_component.hpp> + +class XmppComponent; +class IdentdSocket; +class IdentdServer; +template <typename T> +class TcpSocketServer; + +class IdentdSocket: public TCPSocketHandler +{ + public: + IdentdSocket(std::shared_ptr<Poller> poller, const socket_t socket, TcpSocketServer<IdentdSocket>& server); + ~IdentdSocket() = default; + std::string generate_answer(const BiboumiComponent& biboumi, uint16_t local, uint16_t remote); + + void parse_in_buffer(const std::size_t size) override final; + void on_connection_close(const std::string& message) override final + {} + + bool is_connected() const override final + { + return true; + } + bool is_connecting() const override final + { + return false; + } + + private: + void connect() override + { assert(false); } + void on_connection_failed(const std::string&) override final + { assert(false); } + + IdentdServer& server; +}; |