#include <chargen.h>
Public Member Functions | |
virtual | ~endpoint_chargen () |
Static Public Member Functions | |
static pointer | create (int fd) |
Protected Member Functions | |
int | get_write_file_descriptor () |
void | process_read () |
void | process_write () |
Private Member Functions | |
endpoint_chargen (int fd) | |
endpoint_chargen () | |
endpoint_chargen (const endpoint_chargen &rhs) | |
endpoint_chargen & | operator= (const endpoint_chargen &rhs) |
Private Attributes | |
size_t | sequence |
char | data [74] |
size_t | data_size |
size_t | data_position |
The plumbing::endpoint_chargen class is used to represent a server that gerenerates test as spefified in RFC864.
Definition at line 30 of file chargen.h.
plumbing::endpoint_chargen::~endpoint_chargen | ( | ) | [virtual] |
The destructor.
Definition at line 25 of file chargen.cc.
plumbing::endpoint_chargen::endpoint_chargen | ( | int | fd | ) | [private] |
The constructor. It is private on purpose, use the create class method instead.
fd | The file descriptor connected to the client for both reading and writing. |
Definition at line 30 of file chargen.cc.
plumbing::endpoint_chargen::endpoint_chargen | ( | ) | [private] |
The default constructor. Do not use.
plumbing::endpoint_chargen::endpoint_chargen | ( | const endpoint_chargen & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialisation. |
plumbing::endpoint::pointer plumbing::endpoint_chargen::create | ( | int | fd | ) | [static] |
The create class methods is used to create new dynamically allocated instances of this class. Typically it is used by the plumbing::endpoint_listener_chargen::endpoint_factory method to create new servers when a connection has been accepted.
fd | The file descriptor connected to the client for both reading and writing. |
Definition at line 40 of file chargen.cc.
int plumbing::endpoint_chargen::get_write_file_descriptor | ( | ) | [protected, virtual] |
The get_write_file_descriptor method is used to obtain the file descriptor that select is to wait upon for write events. The default implementation returns -1.
Reimplemented from plumbing::endpoint.
Definition at line 58 of file chargen.cc.
endpoint_chargen& plumbing::endpoint_chargen::operator= | ( | const endpoint_chargen & | rhs | ) | [private] |
The assignment operator. Do not use.
rhs | The rights hand side of the assignment. |
void plumbing::endpoint_chargen::process_read | ( | ) | [protected, virtual] |
The process_read method is called by the select loop when a readable event is detected on the read file descriptor.
Implements plumbing::endpoint.
Definition at line 47 of file chargen.cc.
void plumbing::endpoint_chargen::process_write | ( | ) | [protected, virtual] |
The process_write method is called by the select loop when a writable event is detected on the read file descriptor.
Implements plumbing::endpoint.
Definition at line 65 of file chargen.cc.
char plumbing::endpoint_chargen::data[74] [private] |
size_t plumbing::endpoint_chargen::data_position [private] |
size_t plumbing::endpoint_chargen::data_size [private] |
size_t plumbing::endpoint_chargen::sequence [private] |