cromp_server Class Reference

#include <cromp_server.h>

Inheritance diagram for cromp_server:

Inheritance graph
[legend]
Collaboration diagram for cromp_server:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 cromp_server (const internet_address &where, int accepting_threads=DEFAULT_ACCEPTERS(), bool instantaneous=true, int max_per_entity=DEFAULT_MAX_ENTITY_QUEUE)
virtual ~cromp_server ()
 IMPLEMENT_CLASS_NAME ("cromp_server")
int clients () const
internet_address location () const
bool instantaneous () const
bool enabled () const
void enable_servers (bool encrypt, cromp_security *security=NIL)
void disable_servers ()
bool find_entity (const octopus_entity &id, internet_address &found)
outcome send_to_client (const octopus_request_id &id, infoton *data)
outcome get_from_client (const octopus_request_id &id, infoton *&data, int timeout)
bool get_sizes (const octopus_entity &id, int &items, int &bytes)
istring responses_text_form () const
void look_for_clients (ithread &requester)
void drop_dead_clients ()
bool encrypting () const
infotonwrap_infoton (infoton *&request, const octopus_entity &ent)

Static Public Member Functions

static internet_address any_address (int port)
static int DEFAULT_ACCEPTERS ()

Detailed Description

Definition at line 42 of file cromp_server.h.


Constructor & Destructor Documentation

cromp_server::cromp_server ( const internet_address where,
int  accepting_threads = DEFAULT_ACCEPTERS(),
bool  instantaneous = true,
int  max_per_entity = DEFAULT_MAX_ENTITY_QUEUE 
)

Definition at line 476 of file cromp_server.cpp.

References FUNCDEF.

cromp_server::~cromp_server (  )  [virtual]

Definition at line 494 of file cromp_server.cpp.

References disable_servers(), NIL, and WHACK().


Member Function Documentation

cromp_server::IMPLEMENT_CLASS_NAME ( "cromp_server"   ) 

int cromp_server::clients (  )  const

Definition at line 629 of file cromp_server.cpp.

References LOCK_LISTS.

internet_address cromp_server::any_address ( int  port  )  [static]

Definition at line 512 of file cromp_server.cpp.

internet_address cromp_server::location (  )  const

Definition at line 507 of file cromp_server.cpp.

bool cromp_server::instantaneous (  )  const [inline]

Definition at line 69 of file cromp_server.h.

bool cromp_server::enabled (  )  const [inline]

Definition at line 72 of file cromp_server.h.

void cromp_server::enable_servers ( bool  encrypt,
cromp_security security = NIL 
)

Definition at line 565 of file cromp_server.cpp.

References cromp_common::add_tentacle(), thread_cabinet::add_thread(), object_base::class_name(), FUNCDEF, LOG, NIL, cromp_common::open_common(), and internet_address::text_form().

void cromp_server::disable_servers (  ) 

Definition at line 601 of file cromp_server.cpp.

References cromp_common::close_common(), FUNCDEF, LOCK_LISTS, thread_cabinet::stop_all(), and WHACK().

Referenced by ~cromp_server().

bool cromp_server::find_entity ( const octopus_entity id,
internet_address found 
)

Definition at line 635 of file cromp_server.cpp.

References FUNCDEF, LOCK_LISTS, and negative().

outcome cromp_server::send_to_client ( const octopus_request_id id,
infoton data 
)

Definition at line 698 of file cromp_server.cpp.

References FUNCDEF, LOG, cromp_common::octo(), and cromp_common::OKAY.

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

Definition at line 711 of file cromp_server.cpp.

References FUNCDEF, LOCK_LISTS, negative(), and cromp_common::NOT_FOUND.

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

Definition at line 509 of file cromp_server.cpp.

References entity_data_bin::get_sizes(), cromp_common::octo(), and octopus::responses().

istring cromp_server::responses_text_form (  )  const

Reimplemented from cromp_common.

Definition at line 518 of file cromp_server.cpp.

References cromp_common::octo(), octopus::responses(), and entity_data_bin::text_form().

int cromp_server::DEFAULT_ACCEPTERS (  )  [static]

Definition at line 521 of file cromp_server.cpp.

void cromp_server::look_for_clients ( ithread requester  ) 

Definition at line 677 of file cromp_server.cpp.

References ACCEPTANCE_SNOOZE, FUNCDEF, LOG, cromp_common::NOT_FOUND, cromp_common::OKAY, spocket::outcome_name(), ithread::should_stop(), and portable::sleep_ms().

void cromp_server::drop_dead_clients (  ) 

Definition at line 724 of file cromp_server.cpp.

References DEAD_CLIENT_CLEANING_INTERVAL, FUNCDEF, LOCK_LISTS, LOG, and time_stamp::reset().

bool cromp_server::encrypting (  )  const [inline]

Definition at line 125 of file cromp_server.h.

infoton * cromp_server::wrap_infoton ( infoton *&  request,
const octopus_entity ent 
)

Definition at line 532 of file cromp_server.cpp.

References encryption_wrapper::_wrapped, infoton::fast_pack(), FUNCDEF, encryption_tentacle::keys(), key_repository::lock(), LOG, NIL, octopus_entity::text_form(), key_repository::unlock(), and WHACK().


The documentation for this class was generated from the following files:
Generated on Tue Aug 19 05:12:16 2008 for HOOPLE Libraries by  doxygen 1.5.1