feisty meow concerns codebase
2.140
|
#include <cromp_server.h>
Static Public Member Functions | |
static sockets::internet_address | any_address (int port) |
static int | DEFAULT_ACCEPTERS () |
Static Public Member Functions inherited from cromp::cromp_common | |
static int | default_port () |
static const char * | outcome_name (const basis::outcome &to_name) |
static basis::astring | chew_hostname (const sockets::internet_address &addr, sockets::internet_address *resolved=NULL_POINTER) |
static double | total_bytes_sent () |
static double | total_bytes_received () |
static bool | decode_host (const basis::astring &coded_host, basis::astring &hostname, sockets::machine_uid &machine) |
static const crypto::rsa_crypto & | localhost_only_key () |
Additional Inherited Members | |
Public Types inherited from cromp::cromp_common | |
enum | outcomes { OKAY = basis::common::OKAY , DISALLOWED = basis::common::DISALLOWED , BAD_INPUT = basis::common::BAD_INPUT , NOT_FOUND = basis::common::NOT_FOUND , TIMED_OUT = basis::common::TIMED_OUT , GARBAGE = basis::common::GARBAGE , NO_HANDLER = basis::common::NO_HANDLER , PARTIAL = basis::common::PARTIAL , ENCRYPTION_MISMATCH = basis::common::ENCRYPTION_MISMATCH , NO_SERVER = sockets::communication_commons::NO_SERVER , NO_CONNECTION = sockets::communication_commons::NO_CONNECTION } |
Static Public Attributes inherited from cromp::cromp_common | |
static const int | HOSTCHOP = 6 |
Protected Member Functions inherited from cromp::cromp_common | |
octopi::octopus * | singleton () const |
Definition at line 46 of file cromp_server.h.
cromp::cromp_server::cromp_server | ( | const sockets::internet_address & | where, |
int | accepting_threads = DEFAULT_ACCEPTERS() , |
||
bool | instantaneous = true , |
||
int | max_per_entity = DEFAULT_MAX_ENTITY_QUEUE |
||
) |
Definition at line 485 of file cromp_server.cpp.
References FUNCDEF.
|
virtual |
Definition at line 504 of file cromp_server.cpp.
References disable_servers(), NULL_POINTER, and basis::WHACK().
|
static |
Definition at line 523 of file cromp_server.cpp.
int cromp::cromp_server::clients | ( | ) | const |
Definition at line 643 of file cromp_server.cpp.
References LOCK_LISTS.
|
static |
Definition at line 532 of file cromp_server.cpp.
cromp::cromp_server::DEFINE_CLASS_NAME | ( | "cromp_server" | ) |
void cromp::cromp_server::disable_servers | ( | ) |
Definition at line 614 of file cromp_server.cpp.
References cromp::cromp_common::close_common(), FUNCDEF, LOCK_LISTS, processes::thread_cabinet::stop_all(), and basis::WHACK().
Referenced by ~cromp_server().
bool cromp::cromp_server::disconnect_entity | ( | const octopi::octopus_entity & | id | ) |
returns true if the "id" can be found and disconnected.
Definition at line 649 of file cromp_server.cpp.
References FUNCDEF, LOCK_LISTS, and basis::negative().
void cromp::cromp_server::drop_dead_clients | ( | ) |
Definition at line 775 of file cromp_server.cpp.
References cromp::DEAD_CLIENT_CLEANING_INTERVAL, FUNCDEF, LOCK_LISTS, LOG, and timely::time_stamp::reset().
outcome cromp::cromp_server::enable_servers | ( | bool | encrypt, |
cromp_security * | security = NULL_POINTER |
||
) |
Definition at line 571 of file cromp_server.cpp.
References cromp::cromp_common::add_tentacle(), processes::thread_cabinet::add_thread(), FUNCDEF, LOG, NULL_POINTER, cromp::cromp_common::OKAY, cromp::cromp_common::open_common(), cromp::cromp_common::outcome_name(), sockets::internet_address::text_form(), and basis::WHACK().
|
inline |
Definition at line 76 of file cromp_server.h.
|
inline |
Definition at line 136 of file cromp_server.h.
bool cromp::cromp_server::find_entity | ( | const octopi::octopus_entity & | id, |
sockets::internet_address & | found | ||
) |
Definition at line 662 of file cromp_server.cpp.
References FUNCDEF, LOCK_LISTS, and basis::negative().
outcome cromp::cromp_server::get_from_client | ( | const octopi::octopus_request_id & | id, |
octopi::infoton *& | data, | ||
int | timeout | ||
) |
Definition at line 761 of file cromp_server.cpp.
References FUNCDEF, LOCK_LISTS, basis::negative(), and cromp::cromp_common::NOT_FOUND.
bool cromp::cromp_server::get_sizes | ( | const octopi::octopus_entity & | id, |
int & | items, | ||
int & | bytes | ||
) |
Definition at line 520 of file cromp_server.cpp.
References octopi::entity_data_bin::get_sizes(), cromp::cromp_common::octo(), and octopi::octopus::responses().
|
inline |
Definition at line 73 of file cromp_server.h.
internet_address cromp::cromp_server::location | ( | ) | const |
Definition at line 518 of file cromp_server.cpp.
void cromp::cromp_server::look_for_clients | ( | processes::ethread & | requester | ) |
Definition at line 708 of file cromp_server.cpp.
References cromp::ACCEPTANCE_SNOOZE, FUNCDEF, LOG, cromp::cromp_common::NOT_FOUND, cromp::cromp_common::OKAY, and processes::ethread::should_stop().
astring cromp::cromp_server::responses_text_form | ( | ) | const |
Definition at line 529 of file cromp_server.cpp.
References cromp::cromp_common::octo(), octopi::octopus::responses(), and octopi::entity_data_bin::text_form().
outcome cromp::cromp_server::send_to_client | ( | const octopi::octopus_request_id & | id, |
octopi::infoton * | data | ||
) |
Definition at line 730 of file cromp_server.cpp.
References FUNCDEF, LOG, cromp::cromp_common::octo(), and cromp::cromp_common::OKAY.
infoton * cromp::cromp_server::wrap_infoton | ( | octopi::infoton *& | request, |
const octopi::octopus_entity & | ent | ||
) |
Definition at line 538 of file cromp_server.cpp.
References octopi::octenc_key_record::_key, octopi::encryption_wrapper::_wrapped, crypto::blowfish_crypto::encrypt(), FUNCDEF, octopi::encryption_tentacle::keys(), octopi::key_repository::lock(), LOG, NULL_POINTER, octopi::octopus_entity::text_form(), octopi::infoton::text_form(), octopi::key_repository::unlock(), and basis::WHACK().