예제 #1
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));
		}
예제 #2
0
			size_t Write(const ConstBufferT &buffer, const u_int64 &offset)
			{
				return impl_->Write(buffer.data(), buffer.size(), offset);
			}
예제 #3
0
			size_t Write(const ConstBufferT &buffer)
			{
				return impl_->Write(buffer.data(), buffer.size(), 0);
			}
예제 #4
0
			void AsyncWrite(const ConstBufferT &buffer, const u_int64 &offset, const HandlerT &callback)
			{
				return impl_->AsyncWrite(buffer.data(), buffer.size(), offset, callback);
			}