當前位置: 首頁>>代碼示例>>C++>>正文


C++ ASIO_MOVE_CAST函數代碼示例

本文整理匯總了C++中ASIO_MOVE_CAST函數的典型用法代碼示例。如果您正苦於以下問題:C++ ASIO_MOVE_CAST函數的具體用法?C++ ASIO_MOVE_CAST怎麽用?C++ ASIO_MOVE_CAST使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了ASIO_MOVE_CAST函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: read_op

 read_op(AsyncReadStream& stream, const std::array<Elem, 2>& buffers,
     CompletionCondition completion_condition, ReadHandler& handler)
   : detail::base_from_completion_cond<
       CompletionCondition>(completion_condition),
     stream_(stream),
     buffers_(buffers),
     start_(0),
     total_transferred_(0),
     handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
 {
 }
開發者ID:4nc3str4l,項目名稱:LostEngine,代碼行數:11,代碼來源:read.hpp

示例2: win_iocp_socket_recvmsg_op

 win_iocp_socket_recvmsg_op(
     socket_ops::weak_cancel_token_type cancel_token,
     const MutableBufferSequence& buffers,
     socket_base::message_flags& out_flags, Handler& handler)
   : operation(&win_iocp_socket_recvmsg_op::do_complete),
     cancel_token_(cancel_token),
     buffers_(buffers),
     out_flags_(out_flags),
     handler_(ASIO_MOVE_CAST(Handler)(handler))
 {
 }
開發者ID:AliAkbarMontazeri,項目名稱:AtomicGameEngine,代碼行數:11,代碼來源:win_iocp_socket_recvmsg_op.hpp

示例3: connect_op

 connect_op(basic_socket<Protocol, SocketService>& sock,
            const Iterator& begin, const Iterator& end,
            const ConnectCondition& connect_condition,
            ComposedConnectHandler& handler)
     : base_from_connect_condition<ConnectCondition>(connect_condition),
       socket_(sock),
       iter_(begin),
       end_(end),
       start_(0),
       handler_(ASIO_MOVE_CAST(ComposedConnectHandler)(handler))
 {
 }
開發者ID:kevinlovesing,項目名稱:resiprocate,代碼行數:12,代碼來源:connect.hpp

示例4: read_op

 read_op(AsyncReadStream& stream,
     const asio::mutable_buffers_1& buffers,
     CompletionCondition completion_condition,
     ReadHandler& handler)
   : detail::base_from_completion_cond<
       CompletionCondition>(completion_condition),
     stream_(stream),
     buffer_(buffers),
     total_transferred_(0),
     handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
 {
 }
開發者ID:Almamu,項目名稱:evemu_crucible,代碼行數:12,代碼來源:read.hpp

示例5: read_at_op

 read_at_op(AsyncRandomAccessReadDevice& device,
     boost::uint64_t offset, const asio::mutable_buffers_1& buffers,
     CompletionCondition completion_condition, ReadHandler& handler)
   : detail::base_from_completion_cond<
       CompletionCondition>(completion_condition),
     device_(device),
     offset_(offset),
     buffer_(buffers),
     total_transferred_(0),
     handler_(ASIO_MOVE_CAST(ReadHandler)(handler))
 {
 }
開發者ID:BorisSchaeling,項目名稱:asio,代碼行數:12,代碼來源:read_at.hpp

示例6: win_iocp_socket_recvfrom_op

 win_iocp_socket_recvfrom_op(Endpoint& endpoint,
     socket_ops::weak_cancel_token_type cancel_token,
     const MutableBufferSequence& buffers, Handler& handler)
   : operation(&win_iocp_socket_recvfrom_op::do_complete),
     endpoint_(endpoint),
     endpoint_size_(static_cast<int>(endpoint.capacity())),
     cancel_token_(cancel_token),
     buffers_(buffers),
     handler_(ASIO_MOVE_CAST(Handler)(handler))
 {
   handler_work<Handler>::start(handler_);
 }
開發者ID:Ahbee,項目名稱:Cinder,代碼行數:12,代碼來源:win_iocp_socket_recvfrom_op.hpp

示例7: write_at_op

 write_at_op(AsyncRandomAccessWriteDevice& device,
     boost::uint64_t offset, const ConstBufferSequence& buffers,
     CompletionCondition completion_condition, WriteHandler& handler)
   : detail::base_from_completion_cond<
       CompletionCondition>(completion_condition),
     device_(device),
     offset_(offset),
     buffers_(buffers),
     total_transferred_(0),
     handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
 {
 }
開發者ID:Almamu,項目名稱:evemu_crucible,代碼行數:12,代碼來源:write_at.hpp

示例8: range_connect_op

 range_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
     const EndpointSequence& endpoints,
     const ConnectCondition& connect_condition,
     RangeConnectHandler& handler)
   : base_from_connect_condition<ConnectCondition>(connect_condition),
     socket_(sock),
     endpoints_(endpoints),
     index_(0),
     start_(0),
     handler_(ASIO_MOVE_CAST(RangeConnectHandler)(handler))
 {
 }
開發者ID:Dagarman,項目名稱:mame,代碼行數:12,代碼來源:connect.hpp

示例9: write_op

 write_op(AsyncWriteStream& stream,
     const asio::const_buffers_1& buffers,
     CompletionCondition completion_condition,
     WriteHandler& handler)
   : detail::base_from_completion_cond<
       CompletionCondition>(completion_condition),
     stream_(stream),
     buffer_(buffers),
     total_transferred_(0),
     handler_(ASIO_MOVE_CAST(WriteHandler)(handler))
 {
 }
開發者ID:Shumen,項目名稱:asio,代碼行數:12,代碼來源:write.hpp

示例10: async_accept

  async_accept(basic_socket<Protocol1, SocketService>& peer,
      ASIO_MOVE_ARG(AcceptHandler) handler,
      typename enable_if<is_convertible<Protocol, Protocol1>::value>::type* = 0)
  {
    // If you get an error on the following line it means that your handler does
    // not meet the documented type requirements for a AcceptHandler.
    ASIO_ACCEPT_HANDLER_CHECK(AcceptHandler, handler) type_check;

    return this->get_service().async_accept(this->get_implementation(),
        peer, static_cast<endpoint_type*>(0),
        ASIO_MOVE_CAST(AcceptHandler)(handler));
  }
開發者ID:AbdelghaniDr,項目名稱:Cinder,代碼行數:12,代碼來源:basic_socket_acceptor.hpp

示例11: iterator_connect_op

 iterator_connect_op(basic_socket<Protocol ASIO_SVC_TARG>& sock,
     const Iterator& begin, const Iterator& end,
     const ConnectCondition& connect_condition,
     IteratorConnectHandler& handler)
   : base_from_connect_condition<ConnectCondition>(connect_condition),
     socket_(sock),
     iter_(begin),
     end_(end),
     start_(0),
     handler_(ASIO_MOVE_CAST(IteratorConnectHandler)(handler))
 {
 }
開發者ID:Dagarman,項目名稱:mame,代碼行數:12,代碼來源:connect.hpp

示例12: reactive_socket_recv_op

 reactive_socket_recv_op( socket_type socket,
                          socket_ops::state_type state,
                          const MutableBufferSequence& buffers,
                          socket_base::message_flags flags,
                          Handler& handler )
     : reactive_socket_recv_op_base<MutableBufferSequence>( socket,
                                                            state,
                                                            buffers,
                                                            flags,
                                                            &reactive_socket_recv_op::do_complete ),
       handler_( ASIO_MOVE_CAST( Handler )( handler ) )
 {
 }
開發者ID:obergner,項目名稱:wally-io,代碼行數:13,代碼來源:reactive_socket_recv_op.hpp

示例13: win_iocp_socket_recvmsg_op

 win_iocp_socket_recvmsg_op(
     socket_ops::weak_cancel_token_type cancel_token,
     const MutableBufferSequence& buffers,
     socket_base::message_flags& out_flags,
     Handler& handler, const IoExecutor& io_ex)
   : operation(&win_iocp_socket_recvmsg_op::do_complete),
     cancel_token_(cancel_token),
     buffers_(buffers),
     out_flags_(out_flags),
     handler_(ASIO_MOVE_CAST(Handler)(handler)),
     io_executor_(io_ex)
 {
   handler_work<Handler, IoExecutor>::start(handler_, io_executor_);
 }
開發者ID:DitansKing,項目名稱:asio,代碼行數:14,代碼來源:win_iocp_socket_recvmsg_op.hpp

示例14: win_iocp_socket_accept_op

 win_iocp_socket_accept_op(win_iocp_socket_service_base& socket_service,
     socket_type socket, Socket& peer, const Protocol& protocol,
     typename Protocol::endpoint* peer_endpoint,
     bool enable_connection_aborted, Handler& handler)
   : operation(&win_iocp_socket_accept_op::do_complete),
     socket_service_(socket_service),
     socket_(socket),
     peer_(peer),
     protocol_(protocol),
     peer_endpoint_(peer_endpoint),
     enable_connection_aborted_(enable_connection_aborted),
     handler_(ASIO_MOVE_CAST(Handler)(handler))
 {
 }
開發者ID:AbdelghaniDr,項目名稱:Cinder,代碼行數:14,代碼來源:win_iocp_socket_accept_op.hpp

示例15: win_iocp_socket_move_accept_op

 win_iocp_socket_move_accept_op(
     win_iocp_socket_service_base& socket_service, socket_type socket,
     const Protocol& protocol, asio::io_context& peer_io_context,
     typename Protocol::endpoint* peer_endpoint,
     bool enable_connection_aborted, Handler& handler)
   : operation(&win_iocp_socket_move_accept_op::do_complete),
     socket_service_(socket_service),
     socket_(socket),
     peer_(peer_io_context),
     protocol_(protocol),
     peer_endpoint_(peer_endpoint),
     enable_connection_aborted_(enable_connection_aborted),
     handler_(ASIO_MOVE_CAST(Handler)(handler))
 {
   handler_work<Handler>::start(handler_);
 }
開發者ID:Aulddays,項目名稱:APass,代碼行數:16,代碼來源:win_iocp_socket_accept_op.hpp


注:本文中的ASIO_MOVE_CAST函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。