void TcpConnect::HandleConstAsyncWrite(const boost::shared_ptr<ByteBuffer> bytebuffer, int buffer_size, uint16 flag){ if (state_ != CS_CONNECTED){ //LOG(ERROR) << "The socket is not opened"; return; } AppendWriteData(bytebuffer->Data(), buffer_size, flag); }
void TcpConnect::HandleAsyncWrite(boost::shared_ptr<ByteBuffer> bytebuffer, int buffer_size, uint16 flag){ if (state_ != CS_CONNECTED){ //LOG(ERROR) << "The socket is not opened"; return; } AppendWriteData(bytebuffer->Data(), buffer_size, flag); boost::mutex::scoped_lock buffer_mutex(buffer_mutex_); bytebuffer->Consume(buffer_size); }