PosixSocket.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. #include <ls_std/network/socket/PosixSocket.hpp>
  10. #include <sys/socket.h>
  11. #include <unistd.h>
  12. int ls::std::network::PosixSocket::bind(int _socketFileDescriptor, const struct sockaddr *_address, socklen_t _addressLength)
  13. {
  14. return ::bind(_socketFileDescriptor, _address, _addressLength);
  15. }
  16. int ls::std::network::PosixSocket::close(int _socketFileDescriptor)
  17. {
  18. return ::close(_socketFileDescriptor);
  19. }
  20. int ls::std::network::PosixSocket::connect(int _socketFileDescriptor, const struct sockaddr *_address, socklen_t _addressLength)
  21. {
  22. return ::connect(_socketFileDescriptor, _address, _addressLength);
  23. }
  24. int ls::std::network::PosixSocket::create(int _domain, int _type, int _protocol)
  25. {
  26. return ::socket(_domain, _type, _protocol);
  27. }
  28. int ls::std::network::PosixSocket::listen(int _socketFileDescriptor, int _backlog)
  29. {
  30. return ::listen(_socketFileDescriptor, _backlog);
  31. }