GaiaTCP/Connection.cpp
/// Read bytes from the buffer.
Read bytes from the buffer.
Read bytes from the buffer .
std::size_t Connection::Read(char *buffer, std::size_t buffer_size, bool until_full)
    {
        std::size_t result;
        if (!until_full)
        {
            result = IOSocket.read_some(boost::asio::buffer(buffer, buffer_size));
        }
        else
        {
            result = boost::asio::read(IOSocket, boost::asio::buffer(buffer, buffer_size),
                                     boost::asio::transfer_exactly(buffer_size));
        }
        return result;
    }
std :: size_t Connection :: Read ( char * buffer , std :: size_t buffer_size , bool until_full ) { std :: size_t result ; if ( ! until_full ) { result = IOSocket . read_some ( boost :: asio :: buffer ( buffer , buffer_size ) ) ; } else { result = boost :: asio :: read ( IOSocket , boost :: asio :: buffer ( buffer , buffer_size ) , boost :: asio :: transfer_exactly ( buffer_size ) ) ; } return result ; }
Read bytes from the buffer.
Read bytes from the buffer .