本文整理汇总了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))
{
}
示例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))
{
}
示例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))
{
}
示例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))
{
}
示例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))
{
}
示例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_);
}
示例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))
{
}
示例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))
{
}
示例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))
{
}
示例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));
}
示例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))
{
}
示例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 ) )
{
}
示例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_);
}
示例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))
{
}
示例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_);
}