#include <connection.h>
Public Member Functions | |
| connection (service &creator) | |
| size_t | read (uint8_t *buffer, size_t size) |
| void | continue_write (void) |
| void | flush_write (void) |
| void | error (void) |
| void | run (void) |
| void | yield (void) |
Private Types | |
| enum | { CLIENT_HANDSHAKE_PACKET, CLIENT_HANDSHAKE_FLUSH, COMMAND_PACKET, COMMAND_FLUSH } |
Private Member Functions | |
| connection (const connection &) | |
| connection & | operator= (const connection &) |
| size_t | _client_write (void) |
Private Attributes | |
| enum scalestack::database_proxy::connection:: { ... } | _state |
| bool | _need_handshake |
| bool | _need_yield |
| bool | _in_transaction |
| bool | _shutdown |
| size_t | _size |
| size_t | _packet_size |
| uint8_t * | _buffer |
| client * | _client |
Definition at line 37 of file connection.h.
anonymous enum [private] |
Definition at line 91 of file connection.h.
| scalestack::database_proxy::connection::connection | ( | service & | creator | ) |
Definition at line 35 of file connection.cc.
| scalestack::database_proxy::connection::connection | ( | const connection & | ) | [private] |
Don't allow copying of objects.
| size_t scalestack::database_proxy::connection::read | ( | uint8_t * | buffer, | |
| size_t | size | |||
| ) | [virtual] |
Implements scalestack::network::stream.
Definition at line 50 of file connection.cc.
| void scalestack::database_proxy::connection::continue_write | ( | void | ) |
Continue writing to the client from the read buffer.
Definition at line 57 of file connection.cc.
| void scalestack::database_proxy::connection::flush_write | ( | void | ) | [virtual] |
See network::stream::flush_write().
Implements scalestack::network::stream.
Definition at line 62 of file connection.cc.
| void scalestack::database_proxy::connection::error | ( | void | ) |
Start shutdown process.
Definition at line 68 of file connection.cc.
| void scalestack::database_proxy::connection::run | ( | void | ) | [virtual] |
Process shutdown requests, detaching from client.
Reimplemented from scalestack::network::stream.
Definition at line 74 of file connection.cc.
| void scalestack::database_proxy::connection::yield | ( | void | ) |
Notify connection it can yielf the client now.
Definition at line 100 of file connection.cc.
| connection& scalestack::database_proxy::connection::operator= | ( | const connection & | ) | [private] |
Don't allow assignment of objects.
| size_t scalestack::database_proxy::connection::_client_write | ( | void | ) | [private] |
Write data to the client. This is used by both the read() and continue_write() methods.
Definition at line 110 of file connection.cc.
enum { ... } scalestack::database_proxy::connection::_state [private] |
bool scalestack::database_proxy::connection::_need_handshake [private] |
Definition at line 98 of file connection.h.
bool scalestack::database_proxy::connection::_need_yield [private] |
Definition at line 99 of file connection.h.
bool scalestack::database_proxy::connection::_in_transaction [private] |
Definition at line 100 of file connection.h.
bool scalestack::database_proxy::connection::_shutdown [private] |
Definition at line 101 of file connection.h.
size_t scalestack::database_proxy::connection::_size [private] |
Definition at line 102 of file connection.h.
size_t scalestack::database_proxy::connection::_packet_size [private] |
Definition at line 103 of file connection.h.
uint8_t* scalestack::database_proxy::connection::_buffer [private] |
Definition at line 104 of file connection.h.
Definition at line 105 of file connection.h.
1.6.3