A type X meets the AsyncWriteStream requirements if it satisfies the requirements listed below.
In the table below, a denotes a value of type X, cb denotes a (possibly const) value of a type satisfying the ConstBufferSequence ([buffer.reqmts.constbuffersequence]) requirements, and t is a completion token.
operation | type | semantics, pre/post-conditions |
a.get_executor() | A type satisfying the Executor requirements ([async.reqmts.executor]). | Returns the associated I/O executor. |
a.async_write_some(cb,t) | The return type is determined according to the requirements for an asynchronous operation ([async.reqmts.async]). |
Meets the requirements for a write operation ([buffer.reqmts.read.write]) and an asynchronous operation ([async.reqmts.async]) with completion signature void(error_code ec, size_t n). If buffer_size(cb) > 0, initiates an asynchronous operation to write one or more bytes of data to the stream a from the buffer sequence cb. If successful, ec is set such that !ec is true, and n is the number of bytes written. If an error occurred, ec is set such that !!ec is true, and n is 0. If buffer_size(cb) == 0, the operation completes immediately. ec is set such that !ec is true, and n is 0. |