|
boost::asio::io_service & | default_io_service () |
|
template<typename AsyncReadStream , typename MutableBufferSequence > |
size_t | read (AsyncReadStream &s, const MutableBufferSequence &buf) |
| wraps boost::asio::async_read More...
|
|
template<typename AsyncReadStream , typename MutableBufferSequence > |
future< size_t > | read_some (AsyncReadStream &s, const MutableBufferSequence &buf) |
|
template<typename AsyncReadStream > |
future< size_t > | read_some (AsyncReadStream &s, char *buffer, size_t length, size_t offset=0) |
|
template<typename AsyncReadStream > |
future< size_t > | read_some (AsyncReadStream &s, const std::shared_ptr< char > &buffer, size_t length, size_t offset) |
|
template<typename AsyncReadStream , typename MutableBufferSequence > |
void | async_read_some (AsyncReadStream &s, const MutableBufferSequence &buf, promise< size_t >::ptr completion_promise) |
|
template<typename AsyncReadStream > |
void | async_read_some (AsyncReadStream &s, char *buffer, size_t length, promise< size_t >::ptr completion_promise) |
|
template<typename AsyncReadStream > |
void | async_read_some (AsyncReadStream &s, const std::shared_ptr< char > &buffer, size_t length, size_t offset, promise< size_t >::ptr completion_promise) |
|
template<typename AsyncReadStream > |
size_t | read_some (AsyncReadStream &s, boost::asio::streambuf &buf) |
|
template<typename AsyncWriteStream , typename ConstBufferSequence > |
size_t | write (AsyncWriteStream &s, const ConstBufferSequence &buf) |
| wraps boost::asio::async_write More...
|
|
template<typename AsyncWriteStream , typename ConstBufferSequence > |
future< size_t > | write_some (AsyncWriteStream &s, const ConstBufferSequence &buf) |
| wraps boost::asio::async_write_some More...
|
|
template<typename AsyncWriteStream > |
future< size_t > | write_some (AsyncWriteStream &s, const char *buffer, size_t length, size_t offset=0) |
|
template<typename AsyncWriteStream > |
future< size_t > | write_some (AsyncWriteStream &s, const std::shared_ptr< const char > &buffer, size_t length, size_t offset) |
|
template<typename AsyncWriteStream , typename ConstBufferSequence > |
void | async_write_some (AsyncWriteStream &s, const ConstBufferSequence &buf, promise< size_t >::ptr completion_promise) |
| wraps boost::asio::async_write_some More...
|
|
template<typename AsyncWriteStream > |
void | async_write_some (AsyncWriteStream &s, const char *buffer, size_t length, promise< size_t >::ptr completion_promise) |
|
template<typename AsyncWriteStream > |
void | async_write_some (AsyncWriteStream &s, const std::shared_ptr< const char > &buffer, size_t length, size_t offset, promise< size_t >::ptr completion_promise) |
|
defines fc wrappers for boost::asio functions.
template<typename AsyncReadStream , typename MutableBufferSequence >
future<size_t> fc::asio::read_some |
( |
AsyncReadStream & |
s, |
|
|
const MutableBufferSequence & |
buf |
|
) |
| |
This method will read at least 1 byte from the stream and will cooperatively block until that byte is available or an error occurs.
If the stream is not in 'non-blocking' mode it will be put in 'non-blocking' mode it the stream supports s.non_blocking() and s.non_blocking(bool).
If in non blocking mode, the call will be synchronous avoiding heap allocs and context switching. If the sync call returns 'would block' then an promise is created and an async read is generated.
- Returns
- the number of bytes read.
Definition at line 122 of file asio.hpp.