UnixSocketDescriptor.hpp 896 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2022-12-30
  6. * Changed: 2022-12-31
  7. *
  8. * */
  9. #ifndef LS_STD_UNIX_SOCKET_DESCRIPTOR_HPP
  10. #define LS_STD_UNIX_SOCKET_DESCRIPTOR_HPP
  11. #include <ls_std/core/types/SocketTypes.hpp>
  12. namespace ls::std::network
  13. {
  14. class UnixSocketDescriptor
  15. {
  16. public:
  17. explicit UnixSocketDescriptor(const ls::std::core::type::connection_id& _connectionId, const int& _descriptor);
  18. ~UnixSocketDescriptor();
  19. bool operator () (const ls::std::network::UnixSocketDescriptor& _socketDescriptor) const;
  20. [[nodiscard]] ls::std::core::type::connection_id getConnectionId() const;
  21. [[nodiscard]] int getDescriptor() const;
  22. private:
  23. ls::std::core::type::connection_id connectionId{};
  24. int descriptor{};
  25. };
  26. }
  27. #endif