feisty meow concerns codebase  2.140
cromp::cromp_server Class Reference

#include <cromp_server.h>

Inheritance diagram for cromp::cromp_server:
Collaboration diagram for cromp::cromp_server:

Public Member Functions

 cromp_server (const sockets::internet_address &where, int accepting_threads=DEFAULT_ACCEPTERS(), bool instantaneous=true, int max_per_entity=DEFAULT_MAX_ENTITY_QUEUE)
 
virtual ~cromp_server ()
 
 DEFINE_CLASS_NAME ("cromp_server")
 
int clients () const
 
sockets::internet_address location () const
 
bool instantaneous () const
 
bool enabled () const
 
basis::outcome enable_servers (bool encrypt, cromp_security *security=NULL_POINTER)
 
void disable_servers ()
 
bool find_entity (const octopi::octopus_entity &id, sockets::internet_address &found)
 
bool disconnect_entity (const octopi::octopus_entity &id)
 returns true if the "id" can be found and disconnected. More...
 
basis::outcome send_to_client (const octopi::octopus_request_id &id, octopi::infoton *data)
 
basis::outcome get_from_client (const octopi::octopus_request_id &id, octopi::infoton *&data, int timeout)
 
bool get_sizes (const octopi::octopus_entity &id, int &items, int &bytes)
 
basis::astring responses_text_form () const
 
void look_for_clients (processes::ethread &requester)
 
void drop_dead_clients ()
 
bool encrypting () const
 
octopi::infotonwrap_infoton (octopi::infoton *&request, const octopi::octopus_entity &ent)
 
- Public Member Functions inherited from cromp::cromp_common
 cromp_common (const basis::astring &host, int max_per_ent)
 
 cromp_common (sockets::spocket *preexisting, octopi::octopus *singleton)
 
virtual ~cromp_common ()
 
 DEFINE_CLASS_NAME ("cromp_common")
 
basis::outcome open_common (const sockets::internet_address &where)
 
basis::outcome close_common ()
 
sockets::spocketspock () const
 
sockets::internet_address other_side () const
 
virtual basis::outcome add_tentacle (octopi::tentacle *to_add, bool filter=false)
 
basis::astring responses_text_form () const
 
bool buffer_clog (int clog_point=1 *basis::MEGABYTE) const
 
basis::outcome pack_and_ship (const octopi::infoton &request, const octopi::octopus_request_id &item_id, int max_tries)
 
basis::outcome pack_and_ship (const octopi::infoton_list &requests, int max_tries)
 
basis::outcome retrieve_and_restore (octopi::infoton *&item, const octopi::octopus_request_id &req_id, int timeout)
 
basis::outcome retrieve_and_restore_any (octopi::infoton *&item, octopi::octopus_request_id &req_id, int timeout)
 
basis::outcome push_outgoing (int max_tries)
 
void grab_anything (bool wait)
 
basis::outcome send_buffer ()
 
int max_bytes_per_entity () const
 
void max_bytes_per_entity (int max_bytes_per_entity)
 
octopi::octopusocto () const
 
int pending_sends () const
 returns the number of bytes still unsent. More...
 
int accumulated_bytes () const
 returns the number of bytes pending processing from the other side. More...
 

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_cryptolocalhost_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::octopussingleton () const
 

Detailed Description

Definition at line 46 of file cromp_server.h.

Constructor & Destructor Documentation

◆ cromp_server()

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.

◆ ~cromp_server()

cromp::cromp_server::~cromp_server ( )
virtual

Definition at line 504 of file cromp_server.cpp.

References disable_servers(), NULL_POINTER, and basis::WHACK().

Member Function Documentation

◆ any_address()

internet_address cromp::cromp_server::any_address ( int  port)
static

Definition at line 523 of file cromp_server.cpp.

◆ clients()

int cromp::cromp_server::clients ( ) const

Definition at line 643 of file cromp_server.cpp.

References LOCK_LISTS.

◆ DEFAULT_ACCEPTERS()

int cromp::cromp_server::DEFAULT_ACCEPTERS ( )
static

Definition at line 532 of file cromp_server.cpp.

◆ DEFINE_CLASS_NAME()

cromp::cromp_server::DEFINE_CLASS_NAME ( "cromp_server"  )

◆ disable_servers()

void cromp::cromp_server::disable_servers ( )

◆ disconnect_entity()

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().

◆ drop_dead_clients()

void cromp::cromp_server::drop_dead_clients ( )

◆ enable_servers()

◆ enabled()

bool cromp::cromp_server::enabled ( ) const
inline

Definition at line 76 of file cromp_server.h.

◆ encrypting()

bool cromp::cromp_server::encrypting ( ) const
inline

Definition at line 136 of file cromp_server.h.

◆ find_entity()

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().

◆ get_from_client()

outcome cromp::cromp_server::get_from_client ( const octopi::octopus_request_id id,
octopi::infoton *&  data,
int  timeout 
)

◆ get_sizes()

bool cromp::cromp_server::get_sizes ( const octopi::octopus_entity id,
int &  items,
int &  bytes 
)

◆ instantaneous()

bool cromp::cromp_server::instantaneous ( ) const
inline

Definition at line 73 of file cromp_server.h.

◆ location()

internet_address cromp::cromp_server::location ( ) const

Definition at line 518 of file cromp_server.cpp.

◆ look_for_clients()

void cromp::cromp_server::look_for_clients ( processes::ethread requester)

◆ responses_text_form()

astring cromp::cromp_server::responses_text_form ( ) const

◆ send_to_client()

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.

◆ wrap_infoton()


The documentation for this class was generated from the following files: