gettable_socket_option.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // gettable_socket_option.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP
  11. #define ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP
  12. #include <cstddef>
  13. namespace archetypes {
  14. template <typename PointerType>
  15. class gettable_socket_option
  16. {
  17. public:
  18. template <typename Protocol>
  19. int level(const Protocol&) const
  20. {
  21. return 0;
  22. }
  23. template <typename Protocol>
  24. int name(const Protocol&) const
  25. {
  26. return 0;
  27. }
  28. template <typename Protocol>
  29. PointerType* data(const Protocol&)
  30. {
  31. return 0;
  32. }
  33. template <typename Protocol>
  34. std::size_t size(const Protocol&) const
  35. {
  36. return 0;
  37. }
  38. template <typename Protocol>
  39. void resize(const Protocol&, std::size_t)
  40. {
  41. }
  42. };
  43. } // namespace archetypes
  44. #endif // ARCHETYPES_GETTABLE_SOCKET_OPTION_HPP