ACE_INet
6.1.8
|
#include <StreamHandler.h>
Classes | |
class | NotificationStrategyGuard |
Public Types | |
typedef StreamHandler < ACE_PEER_STREAM, ACE_SYNCH_USE > | this_type |
typedef ACE_Svc_Handler < ACE_PEER_STREAM, ACE_SYNCH_USE > | base_type |
typedef ACE_Message_Queue < ACE_SYNCH_USE > | mq_type |
![]() | |
typedef ACE_PEER_STREAM_ADDR | addr_type |
typedef ACE_PEER_STREAM | stream_type |
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. More... | |
virtual | ~StreamHandler () |
Destructor. More... | |
virtual int | open (void *=0) |
Activate the connection. More... | |
virtual int | close (u_long flags=0) |
Close the connection. More... | |
virtual int | handle_input (ACE_HANDLE) |
virtual int | handle_output (ACE_HANDLE) |
int | read_from_stream (void *buf, size_t length, u_short char_size) |
Called by streambuffer to read/receive new data from peer. More... | |
int | write_to_stream (const void *buf, size_t length, u_short char_size) |
Called by streambuffer to send new data to peer. More... | |
bool | is_connected () const |
Returns true as long as the connection to peer is active. More... | |
bool | using_reactor () const |
Returns true if StreamHandler has been configured for reactive mode. More... | |
![]() | |
ACE_Svc_Handler (ACE_Thread_Manager *thr_mgr=0, ACE_Message_Queue< ACE_SYNCH_USE > *mq=0, ACE_Reactor *reactor=ACE_Reactor::instance()) | |
virtual | ~ACE_Svc_Handler (void) |
virtual int | idle (u_long flags=0) |
virtual ACE_Recyclable_State | recycle_state (void) 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 (void) |
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 (void) const |
virtual void | set_handle (ACE_HANDLE) |
ACE_PEER_STREAM & | peer (void) const |
void * | operator new (size_t n) |
void * | operator new (size_t n, void *p) |
virtual void | destroy (void) |
void | operator delete (void *) |
void | operator delete (void *, void *) |
void | shutdown (void) |
void | dump (void) const |
virtual void | recycler (ACE_Connection_Recycling_Strategy *recycler, const void *recycling_act) |
virtual ACE_Connection_Recycling_Strategy * | recycler (void) const |
virtual const void * | recycling_act (void) const |
virtual int | recycle (void *=0) |
![]() | |
ACE_Task (ACE_Thread_Manager *thr_mgr=0, ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *mq=0) | |
virtual | ~ACE_Task (void) |
ACE_Message_Queue < ACE_SYNCH_USE, TIME_POLICY > * | msg_queue (void) |
void | msg_queue (ACE_Message_Queue< ACE_SYNCH_USE, TIME_POLICY > *) |
ACE_Time_Value_T< TIME_POLICY > | gettimeofday (void) 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_TCHAR * | name (void) const |
ACE_Task< ACE_SYNCH_USE, TIME_POLICY > * | next (void) |
void | next (ACE_Task< ACE_SYNCH_USE, TIME_POLICY > *) |
ACE_Task< ACE_SYNCH_USE, TIME_POLICY > * | sibling (void) |
ACE_Module< ACE_SYNCH_USE, TIME_POLICY > * | module (void) const |
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 (void) const |
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, u_short char_size, ACE_Time_Value *timeout) |
processes queued input More... | |
bool | use_timeout () const |
Returns true if a timeout is to be used on IO operations. More... | |
bool | char_in_queue (u_short char_size) |
Returns true is the queued data contains at least char_size bytes. More... | |
Private Attributes | |
bool | connected_ |
ACE_Synch_Options | sync_opt_ |
bool | send_timeout_ |
bool | receive_timeout_ |
ACE_Reactor_Notification_Strategy | notification_strategy_ |
Additional Inherited Members | |
![]() | |
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 | |
![]() | |
ACE_PEER_STREAM | peer_ |
bool | dynamic_ |
bool | closing_ |
ACE_Connection_Recycling_Strategy * | recycler_ |
const void * | recycling_act_ |
typedef ACE_Svc_Handler<ACE_PEER_STREAM, ACE_SYNCH_USE> ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::base_type |
typedef ACE_Message_Queue<ACE_SYNCH_USE> ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::mq_type |
typedef StreamHandler<ACE_PEER_STREAM, ACE_SYNCH_USE> ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::this_type |
ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::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 |
Destructor.
|
private |
Returns true is the queued data contains at least char_size bytes.
|
virtual |
Close the connection.
Reimplemented from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >.
|
virtual |
Called to handle incoming data when using StreamHandler in reactive mode
|
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.
|
virtual |
Called to handle outgoing data when using StreamHandler in reactive mode
|
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.
bool ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::is_connected | ( | ) | const |
Returns true as long as the connection to peer is active.
|
virtual |
Activate the connection.
Reimplemented from ACE_Svc_Handler< ACE_PEER_STREAM, ACE_SYNCH_USE >.
|
private |
processes queued input
int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::read_from_stream | ( | void * | buf, |
size_t | length, | ||
u_short | char_size | ||
) |
Called by streambuffer to read/receive new data from peer.
|
private |
Returns true if a timeout is to be used on IO operations.
bool ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::using_reactor | ( | ) | const |
Returns true if StreamHandler has been configured for reactive mode.
int ACE::IOS::StreamHandler< ACE_PEER_STREAM_1, ACE_SYNCH_DECL >::write_to_stream | ( | const void * | buf, |
size_t | length, | ||
u_short | char_size | ||
) |
Called by streambuffer to send new data to peer.
|
private |
|
private |
|
private |
|
private |
|
private |