MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Functions
mace::cmt::asio Namespace Reference

defines mace::cmt wrappers for boost::asio functions.

Functions

boost::asio::io_service & default_io_service ()
template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future< size_t > read (AsyncReadStream &s, const MutableBufferSequence &buf)
 wraps boost::asio::async_read
template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future< size_t > read_some (AsyncReadStream &s, const MutableBufferSequence &buf)
 wraps boost::asio::async_read_some
template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future< size_t > write (AsyncReadStream &s, const MutableBufferSequence &buf)
 wraps boost::asio::async_write
template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future< size_t > write_some (AsyncReadStream &s, const MutableBufferSequence &buf)
 wraps boost::asio::async_write_some

Function Documentation

boost::asio::io_service& mace::cmt::asio::default_io_service ( )
Returns:
the default boost::asio::io_service for use with mace::cmt::asio

This IO service is automatically running in its own thread to service asynchronous requests without blocking any other threads.

template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future<size_t> mace::cmt::asio::read ( AsyncReadStream &  s,
const MutableBufferSequence &  buf 
)
Returns:
the number of bytes read.

Definition at line 46 of file asio.hpp.

template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future<size_t> mace::cmt::asio::read_some ( AsyncReadStream &  s,
const MutableBufferSequence &  buf 
)
Returns:
the number of bytes read.

Definition at line 55 of file asio.hpp.

template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future<size_t> mace::cmt::asio::write ( AsyncReadStream &  s,
const MutableBufferSequence &  buf 
)
Returns:
the number of bytes written

Definition at line 65 of file asio.hpp.

template<typename AsyncReadStream , typename MutableBufferSequence >
cmt::future<size_t> mace::cmt::asio::write_some ( AsyncReadStream &  s,
const MutableBufferSequence &  buf 
)
Returns:
the number of bytes written

Definition at line 75 of file asio.hpp.