RawSocketImpl.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // RawSocketImpl.h
  3. //
  4. // Library: Net
  5. // Package: Sockets
  6. // Module: RawSocketImpl
  7. //
  8. // Definition of the RawSocketImpl class.
  9. //
  10. // Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef Net_RawSocketImpl_INCLUDED
  16. #define Net_RawSocketImpl_INCLUDED
  17. #include "Poco/Net/Net.h"
  18. #include "Poco/Net/SocketImpl.h"
  19. namespace Poco {
  20. namespace Net {
  21. class Net_API RawSocketImpl: public SocketImpl
  22. /// This class implements a raw socket.
  23. {
  24. public:
  25. RawSocketImpl();
  26. /// Creates an unconnected IPv4 raw socket with IPPROTO_RAW.
  27. RawSocketImpl(SocketAddress::Family family, int proto = IPPROTO_RAW);
  28. /// Creates an unconnected raw socket.
  29. ///
  30. /// The socket will be created for the
  31. /// given address family.
  32. RawSocketImpl(poco_socket_t sockfd);
  33. /// Creates a RawSocketImpl using the given native socket.
  34. protected:
  35. void init(int af);
  36. void init2(int af, int proto);
  37. ~RawSocketImpl();
  38. };
  39. } } // namespace Poco::Net
  40. #endif // Net_RawSocketImpl_INCLUDED