Write a certain amount of data to a stream before returning. More...
Functions | |
template<typename SyncWriteStream , typename ConstBufferSequence > | |
std::size_t | asio::write (SyncWriteStream &s, const ConstBufferSequence &buffers) |
Write all of the supplied data to a stream before returning. | |
template<typename SyncWriteStream , typename ConstBufferSequence , typename CompletionCondition > | |
std::size_t | asio::write (SyncWriteStream &s, const ConstBufferSequence &buffers, CompletionCondition completion_condition) |
Write a certain amount of data to a stream before returning. | |
template<typename SyncWriteStream , typename ConstBufferSequence , typename CompletionCondition > | |
std::size_t | asio::write (SyncWriteStream &s, const ConstBufferSequence &buffers, CompletionCondition completion_condition, asio::error_code &ec) |
Write a certain amount of data to a stream before returning. | |
template<typename SyncWriteStream , typename Allocator > | |
std::size_t | asio::write (SyncWriteStream &s, basic_streambuf< Allocator > &b) |
Write all of the supplied data to a stream before returning. | |
template<typename SyncWriteStream , typename Allocator , typename CompletionCondition > | |
std::size_t | asio::write (SyncWriteStream &s, basic_streambuf< Allocator > &b, CompletionCondition completion_condition) |
Write a certain amount of data to a stream before returning. | |
template<typename SyncWriteStream , typename Allocator , typename CompletionCondition > | |
std::size_t | asio::write (SyncWriteStream &s, basic_streambuf< Allocator > &b, CompletionCondition completion_condition, asio::error_code &ec) |
Write a certain amount of data to a stream before returning. |
Write a certain amount of data to a stream before returning.
std::size_t asio::write | ( | SyncWriteStream & | s, |
const ConstBufferSequence & | buffers | ||
) |
Write all of the supplied data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
buffers | One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream. |
asio::system_error | Thrown on failure. |
asio::write(s, asio::buffer(data, size));
asio::write( s, buffers, asio::transfer_all());
std::size_t asio::write | ( | SyncWriteStream & | s, |
const ConstBufferSequence & | buffers, | ||
CompletionCondition | completion_condition | ||
) |
Write a certain amount of data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
buffers | One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream. |
completion_condition | The function object to be called to determine whether the write operation is complete. The signature of the function object must be: bool completion_condition( const asio::error_code& error, // Result of latest write_some // operation. std::size_t bytes_transferred // Number of bytes transferred // so far. ); |
asio::system_error | Thrown on failure. |
asio::write(s, asio::buffer(data, size), asio::transfer_at_least(32));
std::size_t asio::write | ( | SyncWriteStream & | s, |
const ConstBufferSequence & | buffers, | ||
CompletionCondition | completion_condition, | ||
asio::error_code & | ec | ||
) |
Write a certain amount of data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
buffers | One or more buffers containing the data to be written. The sum of the buffer sizes indicates the maximum number of bytes to write to the stream. |
completion_condition | The function object to be called to determine whether the write operation is complete. The signature of the function object must be: bool completion_condition( const asio::error_code& error, // Result of latest write_some // operation. std::size_t bytes_transferred // Number of bytes transferred // so far. ); |
ec | Set to indicate what error occurred, if any. |
std::size_t asio::write | ( | SyncWriteStream & | s, |
basic_streambuf< Allocator > & | b | ||
) |
Write all of the supplied data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
b | The basic_streambuf object from which data will be written. |
asio::system_error | Thrown on failure. |
asio::write( s, b, asio::transfer_all());
std::size_t asio::write | ( | SyncWriteStream & | s, |
basic_streambuf< Allocator > & | b, | ||
CompletionCondition | completion_condition | ||
) |
Write a certain amount of data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
b | The basic_streambuf object from which data will be written. |
completion_condition | The function object to be called to determine whether the write operation is complete. The signature of the function object must be: bool completion_condition( const asio::error_code& error, // Result of latest write_some // operation. std::size_t bytes_transferred // Number of bytes transferred // so far. ); |
asio::system_error | Thrown on failure. |
std::size_t asio::write | ( | SyncWriteStream & | s, |
basic_streambuf< Allocator > & | b, | ||
CompletionCondition | completion_condition, | ||
asio::error_code & | ec | ||
) |
Write a certain amount of data to a stream before returning.
This function is used to write a certain number of bytes of data to a stream. The call will block until one of the following conditions is true:
This operation is implemented in terms of one or more calls to the stream's write_some function.
s | The stream to which the data is to be written. The type must support the SyncWriteStream concept. |
b | The basic_streambuf object from which data will be written. |
completion_condition | The function object to be called to determine whether the write operation is complete. The signature of the function object must be: bool completion_condition( const asio::error_code& error, // Result of latest write_some // operation. std::size_t bytes_transferred // Number of bytes transferred // so far. ); |
ec | Set to indicate what error occurred, if any. |