Exemplo n.º 1
0
size_t Connection::send(BufferV &data)
{
    if (state_ != kConnStatesConnected) {
        return -1;
    }
    
    size_t res = send(data.beginRead(), data.readableBytes());

    return res;
}
Exemplo n.º 2
0
size_t BufferV::appendBuffer(BufferV &buffer)
{
    char *data = buffer.beginRead();
    size_t size = buffer.readableBytes();
    return append(data, size);
}