#include <TCP.h>
Public Member Functions | |
TAO_AV_TCP_Flow_Handler (TAO_AV_Callback *callback=0) | |
virtual | ~TAO_AV_TCP_Flow_Handler (void) |
virtual TAO_AV_Transport * | transport (void) |
virtual int | open (void *=0) |
virtual int | handle_input (ACE_HANDLE fd) |
virtual int | handle_timeout (const ACE_Time_Value &tv, const void *arg=0) |
virtual ACE_Event_Handler * | event_handler (void) |
Protected Attributes | |
TAO_AV_Core * | av_core_ |
Definition at line 105 of file TCP.h.
TAO_AV_TCP_Flow_Handler::TAO_AV_TCP_Flow_Handler | ( | TAO_AV_Callback * | callback = 0 |
) |
Definition at line 625 of file TCP.cpp.
:TAO_AV_Flow_Handler (callback) { ACE_NEW (this->transport_, TAO_AV_TCP_Transport (this)); }
TAO_AV_TCP_Flow_Handler::~TAO_AV_TCP_Flow_Handler | ( | void | ) | [virtual] |
Definition at line 632 of file TCP.cpp.
{ delete this->transport_; }
virtual ACE_Event_Handler* TAO_AV_TCP_Flow_Handler::event_handler | ( | void | ) | [inline, virtual] |
int TAO_AV_TCP_Flow_Handler::handle_input | ( | ACE_HANDLE | fd | ) | [virtual] |
Definition at line 698 of file TCP.cpp.
{ return this->protocol_object_->handle_input (); }
int TAO_AV_TCP_Flow_Handler::handle_timeout | ( | const ACE_Time_Value & | tv, | |
const void * | arg = 0 | |||
) | [virtual] |
Reimplemented from ACE_Svc_Handler< ACE_SOCK_STREAM, ACE_NULL_SYNCH >.
Definition at line 704 of file TCP.cpp.
{ return TAO_AV_Flow_Handler::handle_timeout (tv,arg); }
int TAO_AV_TCP_Flow_Handler::open | ( | void * | = 0 |
) | [virtual] |
Reimplemented from ACE_Svc_Handler< ACE_SOCK_STREAM, ACE_NULL_SYNCH >.
Definition at line 644 of file TCP.cpp.
{ #if defined (TCP_NODELAY) int nodelay = 1; if (this->peer ().set_option (IPPROTO_TCP, TCP_NODELAY, (void *) &nodelay, sizeof (nodelay)) == -1) ACE_ERROR_RETURN ((LM_ERROR, "NODELAY failed\n"), -1); #endif /* TCP_NODELAY */ int buf_size = BUFSIZ; int s = sizeof (buf_size); if (this->peer ().get_option (SOL_SOCKET, /*IPPROTO_TCP,*/ SO_RCVBUF, (void *) &buf_size, &s) == -1) buf_size = BUFSIZ; ((TAO_AV_TCP_Object*)(this->protocol_object_))->frame_.size (buf_size); // Called by the <Strategy_Acceptor> when the handler is completely // connected. ACE_INET_Addr addr; if (this->peer ().get_remote_addr (addr) == -1) return -1; ACE_TCHAR server[MAXHOSTNAMELEN + 16]; (void) addr.addr_to_string (server, sizeof (server)); if (TAO_debug_level > 0) if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "(%P|%t) connection to server <%s> on %d\n", server, this->peer ().get_handle ())); this->peer ().enable (ACE_NONBLOCK); // Register the handler with the reactor. if (this->reactor () && this->reactor ()->register_handler (this, ACE_Event_Handler::READ_MASK) == -1) ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("unable to register client handler")), -1); return 0; }
TAO_AV_Transport * TAO_AV_TCP_Flow_Handler::transport | ( | void | ) | [virtual] |
Definition at line 638 of file TCP.cpp.
{ return this->transport_; }
TAO_AV_Core* TAO_AV_TCP_Flow_Handler::av_core_ [protected] |