tcp_stream.hpp 756 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) 2017-2023 zhllxt
  3. *
  4. * author : zhllxt
  5. * email : 37792738@qq.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 __ASIO2_TCP_STREAM_HPP__
  11. #define __ASIO2_TCP_STREAM_HPP__
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. #pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <asio2/base/basic_stream.hpp>
  16. namespace asio2
  17. {
  18. /** A TCP/IP stream socket with timeouts and a polymorphic executor.
  19. @see basic_stream
  20. */
  21. template<class RatePolicy = unlimited_rate_policy>
  22. using tcp_stream = basic_stream<asio::ip::tcp, asio::any_io_executor, RatePolicy>;
  23. }
  24. #endif // !__ASIO2_TCP_STREAM_HPP__