Thrill
0.1
|
Definition at line 66 of file dispatcher.hpp.
#include <dispatcher.hpp>
Public Member Functions | |
AsyncReadBuffer (Connection &conn, size_t buffer_size, const AsyncReadBufferCallback &callback) | |
Construct buffered reader with callback. More... | |
AsyncReadBuffer (const AsyncReadBuffer &)=delete | |
non-copyable: delete copy-constructor More... | |
AsyncReadBuffer (AsyncReadBuffer &&)=default | |
move-constructor: default More... | |
~AsyncReadBuffer () | |
Buffer & | buffer () |
reference to Buffer More... | |
Connection * | connection () const |
Returns conn_. More... | |
uint8_t * | data () |
underlying buffer pointer More... | |
const uint8_t * | data () const |
underlying buffer pointer More... | |
void | DoCallback () |
void | DoCallback (size_t size_check) |
bool | IsDone () const |
bool | operator() () |
Should be called when the socket is readable. More... | |
AsyncReadBuffer & | operator= (const AsyncReadBuffer &)=delete |
non-copyable: delete assignment operator More... | |
AsyncReadBuffer & | operator= (AsyncReadBuffer &&)=default |
move-assignment operator: default More... | |
size_t | size () const |
underlying buffer size More... | |
Private Attributes | |
Buffer | buffer_ |
Receive buffer (allocates memory) More... | |
AsyncReadBufferCallback | callback_ |
functional object to call once data is complete More... | |
Connection * | conn_ |
Connection reference. More... | |
size_t | read_size_ = 0 |
total size currently read More... | |
|
inline |
Construct buffered reader with callback.
Definition at line 70 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, AsyncReadBuffer::conn_, LOGC, AsyncReadBuffer::operator=(), Connection::rx_active_, and Buffer::size().
|
delete |
non-copyable: delete copy-constructor
|
default |
move-constructor: default
|
inline |
Definition at line 90 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, LOGC, and Buffer::size().
|
inline |
reference to Buffer
Definition at line 137 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_.
Referenced by Dispatcher::AsyncWrite().
|
inline |
Returns conn_.
Definition at line 152 of file dispatcher.hpp.
References AsyncReadBuffer::conn_.
Referenced by Dispatcher::PerformAsync().
|
inline |
underlying buffer pointer
Definition at line 155 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, and Buffer::data().
Referenced by Dispatcher::PerformAsync().
|
inline |
underlying buffer pointer
Definition at line 158 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, and Buffer::data().
|
inline |
Definition at line 139 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, AsyncReadBuffer::callback_, and AsyncReadBuffer::conn_.
Referenced by AsyncReadBuffer::DoCallback(), AsyncReadByteBlock::DoCallback(), AsyncReadBuffer::operator()(), AsyncWriteBuffer::operator()(), AsyncReadByteBlock::operator()(), and AsyncWriteBlock::operator()().
|
inline |
Definition at line 146 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, die_unequal, AsyncReadBuffer::DoCallback(), and Buffer::size().
|
inline |
Definition at line 134 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, AsyncReadBuffer::read_size_, and Buffer::size().
|
inline |
Should be called when the socket is readable.
Definition at line 97 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, AsyncReadBuffer::callback_, AsyncReadBuffer::conn_, Buffer::data(), AsyncReadBuffer::DoCallback(), LOGC, AsyncReadBuffer::read_size_, Connection::RecvOne(), Connection::rx_active_, Buffer::size(), and Connection::ToString().
|
delete |
non-copyable: delete assignment operator
Referenced by AsyncReadBuffer::AsyncReadBuffer(), AsyncReadByteBlock::AsyncReadByteBlock(), AsyncWriteBlock::AsyncWriteBlock(), and AsyncWriteBuffer::AsyncWriteBuffer().
|
default |
move-assignment operator: default
|
inline |
underlying buffer size
Definition at line 161 of file dispatcher.hpp.
References AsyncReadBuffer::buffer_, and Buffer::size().
Referenced by Dispatcher::PerformAsync().
|
private |
Receive buffer (allocates memory)
Definition at line 168 of file dispatcher.hpp.
Referenced by AsyncReadBuffer::AsyncReadBuffer(), AsyncWriteBuffer::AsyncWriteBuffer(), AsyncReadBuffer::buffer(), AsyncReadBuffer::data(), AsyncWriteBuffer::data(), AsyncReadBuffer::DoCallback(), AsyncReadBuffer::IsDone(), AsyncWriteBuffer::IsDone(), AsyncReadBuffer::operator()(), AsyncWriteBuffer::operator()(), AsyncReadBuffer::size(), AsyncWriteBuffer::size(), AsyncReadBuffer::~AsyncReadBuffer(), and AsyncWriteBuffer::~AsyncWriteBuffer().
|
private |
functional object to call once data is complete
Definition at line 174 of file dispatcher.hpp.
Referenced by AsyncReadBuffer::DoCallback(), AsyncWriteBuffer::DoCallback(), AsyncReadByteBlock::DoCallback(), AsyncWriteBlock::DoCallback(), and AsyncReadBuffer::operator()().
|
private |
Connection reference.
Definition at line 165 of file dispatcher.hpp.
Referenced by AsyncReadBuffer::AsyncReadBuffer(), AsyncReadByteBlock::AsyncReadByteBlock(), AsyncWriteBlock::AsyncWriteBlock(), AsyncWriteBuffer::AsyncWriteBuffer(), AsyncReadBuffer::connection(), AsyncWriteBuffer::connection(), AsyncReadByteBlock::connection(), AsyncWriteBlock::connection(), AsyncReadBuffer::DoCallback(), AsyncWriteBuffer::DoCallback(), AsyncReadByteBlock::DoCallback(), AsyncWriteBlock::DoCallback(), AsyncReadBuffer::operator()(), AsyncWriteBuffer::operator()(), AsyncReadByteBlock::operator()(), and AsyncWriteBlock::operator()().
|
private |
total size currently read
Definition at line 171 of file dispatcher.hpp.
Referenced by AsyncReadBuffer::IsDone(), and AsyncReadBuffer::operator()().