ACE_INet 7.1.4
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL > Class Template Reference

#include <StreamHandler.h>

Inheritance diagram for ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >:
Inheritance graph
[legend]
Collaboration diagram for ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >:
Collaboration graph
[legend]

Classes

class  NotificationStrategyGuard
 

Public Types

typedef StreamHandler< ACE_PEER_STREAM, ACE_SYNCH_USEthis_type
 
typedef ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USEbase_type
 
typedef ACE_Message_Queue< ACE_SYNCH_USEmq_type
 
- Public Types inherited from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >
typedef PEER_STREAM::PEER_ADDR addr_type
 
typedef PEER_STREAM stream_type
 
- Public Types inherited from ACE_Event_Handler
typedef long Reference_Count
 

Public Member Functions

 StreamHandler (const ACE_Synch_Options &synch_options=ACE_Synch_Options::defaults, ACE_Thread_Manager *thr_mgr=0, mq_type *mq=0, ACE_Reactor *reactor=ACE_Reactor::instance())
 Constructor.
 
virtual ~StreamHandler ()
 Destructor.
 
virtual int open (void *=0)
 Activate the connection.
 
virtual int close (u_long flags=0)
 Close the connection.
 
virtual int handle_input (ACE_HANDLE)
 
virtual int handle_output (ACE_HANDLE)
 
int read_from_stream (void *buf, size_t length, size_t char_size)
 Called by streambuffer to read/receive new data from peer.
 
int write_to_stream (const void *buf, size_t length, size_t char_size)
 Called by streambuffer to send new data to peer.
 
bool is_connected () const
 Returns true as long as the connection to peer is active.
 
bool using_reactor () const
 Returns true if StreamHandler has been configured for reactive mode.
 
- Public Member Functions inherited from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >
 ACE_Svc_Handler (ACE_Thread_Manager *thr_mgr=0, ACE_Message_Queue< SYNCH_TRAITS > *mq=0, ACE_Reactor *reactor=ACE_Reactor::instance())
 
virtual ~ACE_Svc_Handler ()
 
virtual int idle (u_long flags=0)
 
virtual ACE_Recyclable_State recycle_state () const
 
virtual int recycle_state (ACE_Recyclable_State new_state)
 
virtual void cleanup_hint (void **act_holder=0)
 
virtual int init (int argc, ACE_TCHAR *argv[])
 
virtual int fini ()
 
virtual int info (ACE_TCHAR **info_string, size_t length) const
 
virtual int handle_close (ACE_HANDLE=ACE_INVALID_HANDLE, ACE_Reactor_Mask=ACE_Event_Handler::ALL_EVENTS_MASK)
 
virtual int handle_timeout (const ACE_Time_Value &time, const void *)
 
virtual ACE_HANDLE get_handle () const
 
virtual void set_handle (ACE_HANDLE)
 
PEER_STREAM & peer () const
 
void * operator new (size_t n)
 
void * operator new (size_t n, const std::nothrow_t &) noexcept
 
void * operator new (size_t n, void *p)
 
void operator delete (void *p, const std::nothrow_t &) noexcept
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
virtual void destroy ()
 
void shutdown ()
 
void dump () const
 
virtual void recycler (ACE_Connection_Recycling_Strategy *recycler, const void *recycling_act)
 
virtual ACE_Connection_Recycling_Strategyrecycler () const
 
virtual const void * recycling_act () const
 
virtual int recycle (void *=0)
 
- Public Member Functions inherited from ACE_Task< SYNCH_TRAITS >
 ACE_Task (ACE_Thread_Manager *thr_mgr=0, ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *mq=0)
 
virtual ~ACE_Task ()
 
ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > * msg_queue ()
 
void msg_queue (ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *)
 
ACE_Time_Value_T< TIME_POLICY > gettimeofday () const
 
void set_time_policy (TIME_POLICY const &time_policy)
 
int putq (ACE_Message_Block *, ACE_Time_Value *timeout=0)
 
int getq (ACE_Message_Block *&mb, ACE_Time_Value *timeout=0)
 
int ungetq (ACE_Message_Block *, ACE_Time_Value *timeout=0)
 
int reply (ACE_Message_Block *mb, ACE_Time_Value *tv=0)
 
int put_next (ACE_Message_Block *msg, ACE_Time_Value *timeout=0)
 
const ACE_TCHARname () const
 
virtual ACE_Task< ACE_SYNCH_USE, TIME_POLICY > * next ()
 
void next (ACE_Task< ACE_SYNCH_USE, TIME_POLICY > *)
 
ACE_Task< ACE_SYNCH_USE, TIME_POLICY > * sibling ()
 
virtual int flush (u_long flag=ACE_Task_Flags::ACE_FLUSHALL)
 
void water_marks (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds, size_t)
 
void dump () const
 
- Public Member Functions inherited from ACE_Task_Base
 ACE_Task_Base (ACE_Thread_Manager *=0)
 
virtual ~ACE_Task_Base ()
 
virtual int module_closed ()
 
virtual int put (ACE_Message_Block *, ACE_Time_Value *=0)
 
virtual int svc ()
 
virtual int activate (long flags=THR_NEW_LWP|THR_JOINABLE|THR_INHERIT_SCHED, int n_threads=1, int force_active=0, long priority=ACE_DEFAULT_THREAD_PRIORITY, int grp_id=-1, ACE_Task_Base *task=0, ACE_hthread_t thread_handles[]=0, void *stack[]=0, size_t stack_size[]=0, ACE_thread_t thread_ids[]=0, const char *thr_name[]=0)
 
virtual int wait ()
 
virtual int suspend ()
 
virtual int resume ()
 
int grp_id () const
 
void grp_id (int)
 
ACE_Thread_Managerthr_mgr () const
 
void thr_mgr (ACE_Thread_Manager *)
 
int is_reader () const
 
int is_writer () const
 
size_t thr_count () const
 
ACE_thread_t last_thread () const
 
- Public Member Functions inherited from ACE_Service_Object
 ACE_Service_Object (ACE_Reactor *=0)
 
virtual ~ACE_Service_Object ()
 
- Public Member Functions inherited from ACE_Event_Handler
virtual ~ACE_Event_Handler ()=default
 
virtual int priority () const
 
virtual void priority (int priority)
 
virtual int handle_exception (ACE_HANDLE fd=ACE_INVALID_HANDLE)
 
virtual int handle_exit (ACE_Process *)
 
virtual int handle_signal (int signum, siginfo_t *=0, ucontext_t *=0)
 
virtual int resume_handler ()
 
virtual int handle_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual int handle_group_qos (ACE_HANDLE=ACE_INVALID_HANDLE)
 
virtual void reactor (ACE_Reactor *reactor)
 
virtual ACE_Reactorreactor () const
 
virtual ACE_Reactor_Timer_Interfacereactor_timer_interface () const
 
virtual Reference_Count add_reference ()
 
virtual Reference_Count remove_reference ()
 
Reference_Counting_Policyreference_counting_policy ()
 
- Public Member Functions inherited from ACE_Shared_Object
 ACE_Shared_Object ()
 
virtual ~ACE_Shared_Object ()
 

Private Types

enum  { MAX_INPUT_SIZE = 4096 }
 

Private Member Functions

int handle_output_i (ACE_Time_Value *timeout=0)
 
int handle_input_i (size_t rdlen, ACE_Time_Value *timeout=0)
 
int process_input (char *buf, size_t &char_length, size_t char_size, ACE_Time_Value *timeout)
 processes queued input
 
bool use_timeout () const
 Returns true if a timeout is to be used on IO operations.
 
bool char_in_queue (size_t char_size)
 Returns true is the queued data contains at least char_size bytes.
 

Private Attributes

bool connected_
 
ACE_Synch_Options sync_opt_
 
bool send_timeout_
 
bool receive_timeout_
 
ACE_Reactor_Notification_Strategy notification_strategy_
 

Additional Inherited Members

- Static Public Member Functions inherited from ACE_Task_Base
static ACE_THR_FUNC_RETURN svc_run (void *)
 
static void cleanup (void *object, void *params)
 
- Static Public Member Functions inherited from ACE_Event_Handler
static ACE_THR_FUNC_RETURN read_adapter (void *event_handler)
 
static int register_stdin_handler (ACE_Event_Handler *eh, ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr, int flags=THR_DETACHED)
 
static int remove_stdin_handler (ACE_Reactor *reactor, ACE_Thread_Manager *thr_mgr)
 
- Public Attributes inherited from ACE_Task< SYNCH_TRAITS >
ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > * msg_queue_
 
bool delete_msg_queue_
 
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * mod_
 
ACE_Task< ACE_SYNCH_USE, TIME_POLICY > * next_
 
 ACE_ALLOC_HOOK_DECLARE
 
- Public Attributes inherited from ACE_Service_Object
 ACE_ALLOC_HOOK_DECLARE
 
- Public Attributes inherited from ACE_Event_Handler
 LO_PRIORITY
 
 HI_PRIORITY
 
 NULL_MASK
 
 READ_MASK
 
 WRITE_MASK
 
 EXCEPT_MASK
 
 ACCEPT_MASK
 
 CONNECT_MASK
 
 TIMER_MASK
 
 QOS_MASK
 
 GROUP_QOS_MASK
 
 SIGNAL_MASK
 
 ALL_EVENTS_MASK
 
 RWE_MASK
 
 DONT_CALL
 
 ACE_EVENT_HANDLER_NOT_RESUMED
 
 ACE_REACTOR_RESUMES_HANDLER
 
 ACE_APPLICATION_RESUMES_HANDLER
 
- Protected Types inherited from ACE_Event_Handler
typedef std::atomic< Reference_CountAtomic_Reference_Count
 
- Protected Member Functions inherited from ACE_Event_Handler
 ACE_Event_Handler (ACE_Reactor *=nullptr, int priority=ACE_Event_Handler::LO_PRIORITY)
 
- Protected Attributes inherited from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >
PEER_STREAM peer_
 
bool dynamic_
 
bool closing_
 
ACE_Connection_Recycling_Strategyrecycler_
 
const void * recycling_act_
 
- Protected Attributes inherited from ACE_Task_Base
size_t thr_count_
 
ACE_Thread_Managerthr_mgr_
 
u_long flags_
 
int grp_id_
 
ACE_thread_t last_thread_id_
 
- Protected Attributes inherited from ACE_Event_Handler
Atomic_Reference_Count reference_count_
 

Member Typedef Documentation

◆ base_type

◆ mq_type

◆ this_type

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
MAX_INPUT_SIZE 

Constructor & Destructor Documentation

◆ StreamHandler()

Constructor.

◆ ~StreamHandler()

Destructor.

Member Function Documentation

◆ char_in_queue()

bool ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::char_in_queue ( size_t char_size)
private

Returns true is the queued data contains at least char_size bytes.

◆ close()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::close ( u_long flags = 0)
virtual

Close the connection.

Reimplemented from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >.

◆ handle_input()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::handle_input ( ACE_HANDLE )
virtual

Called to handle incoming data when using StreamHandler in reactive mode

Reimplemented from ACE_Event_Handler.

◆ handle_input_i()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::handle_input_i ( size_t rdlen,
ACE_Time_Value * timeout = 0 )
private

Attempts to send queued data to peer. Called either from handle_output in reactive mode or directly from write_to_stream when non-reactive.

◆ handle_output()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::handle_output ( ACE_HANDLE )
virtual

Called to handle outgoing data when using StreamHandler in reactive mode

Reimplemented from ACE_Event_Handler.

◆ handle_output_i()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::handle_output_i ( ACE_Time_Value * timeout = 0)
private

Attempts to receive data from peer and queue it. Called either from handle_input in reactive mode or directly from read_from_stream when non-reactive.

◆ is_connected()

Returns true as long as the connection to peer is active.

◆ open()

Activate the connection.

Reimplemented from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >.

◆ process_input()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::process_input ( char * buf,
size_t & char_length,
size_t char_size,
ACE_Time_Value * timeout )
private

processes queued input

◆ read_from_stream()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::read_from_stream ( void * buf,
size_t length,
size_t char_size )

Called by streambuffer to read/receive new data from peer.

◆ use_timeout()

bool ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::use_timeout ( ) const
private

Returns true if a timeout is to be used on IO operations.

◆ using_reactor()

Returns true if StreamHandler has been configured for reactive mode.

◆ write_to_stream()

int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::write_to_stream ( const void * buf,
size_t length,
size_t char_size )

Called by streambuffer to send new data to peer.

Member Data Documentation

◆ connected_

◆ notification_strategy_

◆ receive_timeout_

◆ send_timeout_

◆ sync_opt_


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