#pragma once #include "Lockable.h" #include "IListenerInterface.h" #include #include #include namespace Feather::Network { class TCPSocket; class TCPListenerClient; class TCPClient { public: TCPClient(std::unique_ptr&& client); TCPClient(TCPClient&& client); ~TCPClient(); const LockableVector& GetData() const; private: std::unique_ptr m_client; }; // TODO: Can we eliminate the move constructor + overloads? // Kinda unclean. inline bool operator==(const TCPClient& a, const TCPClient& b) { return &a == &b; } inline bool operator!=(const TCPClient& a, const TCPClient& b) { return &a != &b; } class TCPListener { public: TCPListener(uint16_t port, IListenerInterface* callbacks); ~TCPListener(); private: IListenerInterface* m_callbacks; std::unique_ptr m_socket; }; }