void async_write(SyncWriteStreamT &s, const ConstBufferT &buf, const ComplateConditionT &condition, HandlerT &&handler, const AllocatorT &allocator)
	{
		typedef details::write_handler_t<SyncWriteStreamT, ConstBufferT, ComplateConditionT, HandlerT, AllocatorT> HookWriteHandler;

		HookWriteHandler hook_handler(s, buf, buf.size(), condition, 0, std::forward<HandlerT>(handler), allocator);
		s.async_write(hook_handler.buffer_, std::move(hook_handler), allocator);
	}
Exemple #2
0
		void async_write(SyncWriteStreamT &s, const ConstBufferT &buf, const ComplateConditionT &condition, const HandlerT &handler)
		{
			typedef detail::write_handler_t<SyncWriteStreamT, ConstBufferT, ComplateConditionT, HandlerT> HookWriteHandler;

			std::uint32_t send_len = detail::MAX_BUFFER_LEN > buf.size() ? buf.size() : detail::MAX_BUFFER_LEN;
			s.async_write(buffer(buf.data(), send_len), HookWriteHandler(s, buf, buf.size(), condition, 0, handler));
		}
	void async_write(SyncWriteStreamT &s, const ConstBufferT &buffer, const std::uint64_t &offset, const ComplateConditionT &condition, HandlerT &&handler)
	{
		typedef details::write_offset_handler_t<SyncWriteStreamT, ConstBufferT, ComplateConditionT, HandlerT> HookWriteHandler;

		s.async_write(buffer, offset, HookWriteHandler(s, buffer, buffer.size(), offset, condition, 0, std::forward<HandlerT>(handler)));
	}
Exemple #4
0
		void async_write(SyncWriteStreamT &s, const ConstBufferT &buffer, const u_int64 &offset, const ComplateConditionT &condition, const HandlerT &handler)
		{
			typedef detail::write_offset_handler_t<SyncWriteStreamT, ConstBufferT, ComplateConditionT, HandlerT> HookWriteHandler;

			s.async_write(buffer, offset, HookWriteHandler(s, buffer, buffer.size(), offset, condition, 0, handler));
		}