PosixSocket.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2022-12-09
  6. * Changed: 2022-12-12
  7. *
  8. * */
  9. #ifndef LS_STD_POSIX_SOCKET_HPP
  10. #define LS_STD_POSIX_SOCKET_HPP
  11. #include <ls_std/core/interface/IPosixSocket.hpp>
  12. namespace ls::std::network
  13. {
  14. class PosixSocket : public ls::std::core::interface_type::IPosixSocket
  15. {
  16. public:
  17. PosixSocket() = default;
  18. ~PosixSocket() override = default;
  19. int accept(int _socketFileDescriptor, struct sockaddr *_address, socklen_t* _addressLength) override;
  20. int bind(int _socketFileDescriptor, const struct sockaddr *_address, socklen_t _addressLength) override;
  21. int close(int _socketFileDescriptor) override;
  22. int connect(int _socketFileDescriptor, const struct sockaddr *_address, socklen_t _addressLength) override;
  23. int create(int _domain, int _type, int _protocol) override;
  24. int listen(int _socketFileDescriptor, int _backlog) override;
  25. };
  26. }
  27. #endif