您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ASIO_MOVE_CAST函数代码示例

51自学网 2021-06-01 19:36:46
  C++
这篇教程C++ ASIO_MOVE_CAST函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ASIO_MOVE_CAST函数的典型用法代码示例。如果您正苦于以下问题:C++ ASIO_MOVE_CAST函数的具体用法?C++ ASIO_MOVE_CAST怎么用?C++ ASIO_MOVE_CAST使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ASIO_MOVE_CAST函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例16: operator

    void operator()(asio::error_code ec, int start = 0)    {        switch (start_ = start)        {        case 1:            for (;;)            {                this->check_condition(ec, iter_, end_);                if (iter_ != end_)                {                    socket_.close(ec);                    socket_.async_connect(*iter_,                                          ASIO_MOVE_CAST(connect_op)(*this));                    return;                }                if (start)                {                    ec = asio::error::not_found;                    socket_.get_io_service().post(detail::bind_handler(*this, ec));                    return;                }            default:                if (iter_ == end_)                    break;                if (!socket_.is_open())                {                    ec = asio::error::operation_aborted;                    break;                }                if (!ec)                    break;                ++iter_;            }            handler_(static_cast<const asio::error_code&>(ec),                     static_cast<const Iterator&>(iter_));        }    }
开发者ID:kevinlovesing,项目名称:resiprocate,代码行数:45,


示例17: operator

    void operator()(const asio::error_code& ec,        std::size_t bytes_transferred, int start = 0)    {      switch (start)      {        case 1:        buffers_.prepare(this->check_for_completion(ec, total_transferred_));        for (;;)        {          device_.async_read_some_at(offset_ + total_transferred_,              buffers_, ASIO_MOVE_CAST(read_at_op)(*this));          return; default:          total_transferred_ += bytes_transferred;          buffers_.consume(bytes_transferred);          buffers_.prepare(this->check_for_completion(ec, total_transferred_));          if ((!ec && bytes_transferred == 0)              || buffers_.begin() == buffers_.end())            break;        }        handler_(ec, static_cast<const std::size_t&>(total_transferred_));      }    }
开发者ID:BorisSchaeling,项目名称:asio,代码行数:23,


示例18: completion_handler

 completion_handler(Handler& h)   : operation(&completion_handler::do_complete),     handler_(ASIO_MOVE_CAST(Handler)(h)) { }
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:5,


示例19: winrt_socket_connect_op

 winrt_socket_connect_op(Handler& handler)   : winrt_async_op<void>(&winrt_socket_connect_op::do_complete),     handler_(ASIO_MOVE_CAST(Handler)(handler)) {   handler_work<Handler>::start(handler_); }
开发者ID:DINKIN,项目名称:mongo,代码行数:6,


示例20: basic_handle

 /**  * This constructor moves a handle from one object to another.  *  * @param other The other basic_handle object from which the move will occur.  *  * @note Following the move, the moved-from object is in the same state as if  * constructed using the @c basic_handle(io_service&) constructor.  */ basic_handle(basic_handle&& other)   : basic_io_object<HandleService>(       ASIO_MOVE_CAST(basic_handle)(other)) { }
开发者ID:dvdjg,项目名称:GoapCpp,代码行数:13,


示例21: ASIO_MOVE_CAST

 /**  * This assignment operator moves a handle from one object to another.  *  * @param other The other basic_handle object from which the move will occur.  *  * @note Following the move, the moved-from object is in the same state as if  * constructed using the @c basic_handle(io_service&) constructor.  */ basic_handle& operator=(basic_handle&& other) {   basic_io_object<HandleService>::operator=(       ASIO_MOVE_CAST(basic_handle)(other));   return *this; }
开发者ID:dvdjg,项目名称:GoapCpp,代码行数:14,


示例22: signal_handler

 signal_handler(Handler& h)   : signal_op(&signal_handler::do_complete),     handler_(ASIO_MOVE_CAST(Handler)(h)) { }
开发者ID:GeorgeShaw,项目名称:resiprocate,代码行数:5,


示例23: basic_resolver_iterator

 /// Move constructor. basic_resolver_iterator(basic_resolver_iterator&& other)   : values_(ASIO_MOVE_CAST(values_ptr_type)(other.values_)),     index_(other.index_) {   other.index_ = 0; }
开发者ID:DitansKing,项目名称:asio,代码行数:7,


示例24: work_dispatcher

 work_dispatcher(work_dispatcher&& other)   : work_(ASIO_MOVE_CAST(executor_work_guard<       typename associated_executor<Handler>::type>)(other.work_)),     handler_(ASIO_MOVE_CAST(Handler)(other.handler_)) { }
开发者ID:0xbda2d2f8,项目名称:asio,代码行数:6,


示例25: winrt_socket_send_op

 winrt_socket_send_op(const ConstBufferSequence& buffers, Handler& handler)   : winrt_async_op<unsigned int>(&winrt_socket_send_op::do_complete),     buffers_(buffers),     handler_(ASIO_MOVE_CAST(Handler)(handler)) { }
开发者ID:AliAkbarMontazeri,项目名称:AtomicGameEngine,代码行数:6,


示例26: buffered_fill_handler

 buffered_fill_handler(buffered_fill_handler&& other)   : storage_(other.storage_),     previous_size_(other.previous_size_),     handler_(ASIO_MOVE_CAST(ReadHandler)(other.handler_)) { }
开发者ID:dvdjg,项目名称:GoapCpp,代码行数:6,


示例27: win_iocp_overlapped_op

 win_iocp_overlapped_op(Handler& handler)   : operation(&win_iocp_overlapped_op::do_complete),     handler_(ASIO_MOVE_CAST(Handler)(handler)) {   handler_work<Handler>::start(handler_); }
开发者ID:damu,项目名称:asio,代码行数:6,


示例28: ASIO_INITFN_RESULT_TYPE

  }  /// Start an asynchronous read. The buffer into which the data will be read  /// must be valid for the lifetime of the asynchronous operation.  template <typename MutableBufferSequence, typename ReadHandler>  ASIO_INITFN_RESULT_TYPE(ReadHandler,      void (asio::error_code, std::size_t))  async_read_some(const MutableBufferSequence& buffers,      ASIO_MOVE_ARG(ReadHandler) handler)  {    detail::async_result_init<      ReadHandler, void (asio::error_code, std::size_t)> init(        ASIO_MOVE_CAST(ReadHandler)(handler));    next_layer_.async_read_some(buffers,        ASIO_MOVE_CAST(ASIO_HANDLER_TYPE(ReadHandler,            void (asio::error_code, std::size_t)))(init.handler));    return init.result.get();  }  /// Peek at the incoming data on the stream. Returns the number of bytes read.  /// Throws an exception on failure.  template <typename MutableBufferSequence>  std::size_t peek(const MutableBufferSequence& buffers)  {    return next_layer_.peek(buffers);  }  /// Peek at the incoming data on the stream. Returns the number of bytes read,  /// or 0 if an error occurred.  template <typename MutableBufferSequence>
开发者ID:AbdelghaniDr,项目名称:Cinder,代码行数:32,



注:本文中的ASIO_MOVE_CAST函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ASIO_TEST_CASE函数代码示例
C++ ASIO_MOVE_ARG函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。