/* * Copyright (c) 2020, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include class Client : public RefCounted { public: static NonnullRefPtr create(int id, NonnullOwnPtr socket) { return adopt_ref(*new Client(id, move(socket))); } Function on_exit; protected: Client(int id, NonnullOwnPtr socket); ErrorOr drain_socket(); void quit(); private: int m_id { 0 }; NonnullOwnPtr m_socket; };