commore  1.0.6-SNAPSHOT
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TCPIPListener Class Reference
+ Inheritance diagram for TCPIPListener:

Public Member Functions

 TCPIPListener (const AString &address, bool safe)
 
 ~TCPIPListener ()
 
size_t get_address_list (ListAString &addressList, bool local)
 
const AStringget_address () const
 
void interface_release ()
 
bool add_port (const AString &given_address_str, int port)
 
bool remove_port (int port)
 
void remove_socket (PSocket socket)
 
size_t get_max_listener_size ()
 
void set_max_listener_size (size_t size)
 
size_t get_buffer_size ()
 
void set_buffer_size (size_t size)
 
void add_listener ()
 
void set_hook (ListenerHook &hook)
 
void reset_hook ()
 
ListenerHookget_hook ()
 
void submit_accept (PSocket socket)
 
bool start ()
 
bool stop ()
 
bool is_ok () const
 
bool is_stopped () const
 
int call (CommBuffer &iarg, CommBuffer &outArg)
 
int call (Tuple &iarg, Tuple &outArg)
 
void set_callback (Callback &callback)
 
void reset_callback ()
 
void set_param (const Tuple &param)
 
Tupleget_param (Tuple &param)
 
- Public Member Functions inherited from commore::Listener
 Listener ()
 
virtual ~Listener ()
 
virtual bool is_ok ()
 
virtual bool is_stopped ()
 
- Public Member Functions inherited from commore::RefObject
 RefObject ()
 
virtual ~RefObject ()
 
virtual void attach ()
 
virtual void release ()
 
virtual void nested_attach ()
 
virtual void nested_release ()
 
virtual void Run ()
 
virtual CriticalSectionget_cs ()
 

Additional Inherited Members

- Static Public Member Functions inherited from commore::Listener
static const ACharfactory_name ()
 
- Static Public Member Functions inherited from commore::RefObject
static AutoRefBase auto_create ()
 
static AutoRefBase auto_create (const AChar *s)
 
static AutoRefBase create ()
 
static AutoRefBase create (const AChar *s)
 
static AutoRefBase bind ()
 
static AutoRefBase bind (const AChar *s)
 
static const ACharfactory_name ()
 
- Protected Attributes inherited from commore::Listener
Callbackcallback_
 

Constructor & Destructor Documentation

TCPIPListener::TCPIPListener ( const AString address,
bool  safe 
)
TCPIPListener::~TCPIPListener ( )

Member Function Documentation

void TCPIPListener::add_listener ( )

!PF

bool TCPIPListener::add_port ( const AString given_address_str,
int  port 
)
int TCPIPListener::call ( CommBuffer iarg,
CommBuffer outArg 
)
int TCPIPListener::call ( Tuple iarg,
Tuple outArg 
)
inline
const AString& TCPIPListener::get_address ( ) const
inlinevirtual
Returns
the encoded address of listener ! as it must appear in the sender spec address field.

Implements commore::Listener.

size_t TCPIPListener::get_address_list ( ListAString addressList,
bool  local 
)
size_t TCPIPListener::get_buffer_size ( )
inline
ListenerHook* TCPIPListener::get_hook ( )
inline
size_t TCPIPListener::get_max_listener_size ( )
inline
Tuple& TCPIPListener::get_param ( Tuple param)
inlinevirtual

Reimplemented from commore::Listener.

void TCPIPListener::interface_release ( )
virtual

Call when nested_release reach count 0 To be implemented by ref object

Todo:
is usefull

Reimplemented from commore::RefObject.

bool TCPIPListener::is_ok ( ) const
inline
bool TCPIPListener::is_stopped ( ) const
inline
bool TCPIPListener::remove_port ( int  port)
void TCPIPListener::remove_socket ( PSocket  socket)
void TCPIPListener::reset_callback ( )
inlinevirtual

Remove listener callback

Reimplemented from commore::Listener.

void TCPIPListener::reset_hook ( )
void TCPIPListener::set_buffer_size ( size_t  size)
inline
void TCPIPListener::set_callback ( Callback callback)
inlinevirtual

Set the listener callbak

Reimplemented from commore::Listener.

void TCPIPListener::set_hook ( ListenerHook hook)
void TCPIPListener::set_max_listener_size ( size_t  size)
inline
void TCPIPListener::set_param ( const Tuple param)
inlinevirtual

Param management

Reimplemented from commore::Listener.

bool TCPIPListener::start ( )
inlinevirtual

Start listen, notice that start is automaticaly called when object is created.

Returns
true if lstener is started

Reimplemented from commore::Listener.

bool TCPIPListener::stop ( )
inlinevirtual

Stop listen Finish current call, close connections, and does not accept new connection any more.

Returns
true if lstener is stopped

Reimplemented from commore::Listener.

void TCPIPListener::submit_accept ( PSocket  socket)

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