Public Member Functions | Protected Attributes

TAO_AV_TCP_Connector Class Reference

#include <TCP.h>

Inheritance diagram for TAO_AV_TCP_Connector:
Inheritance graph
[legend]
Collaboration diagram for TAO_AV_TCP_Connector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_AV_TCP_Connector (void)
virtual ~TAO_AV_TCP_Connector (void)
virtual int open (TAO_Base_StreamEndPoint *endpoint, TAO_AV_Core *av_core, TAO_AV_Flow_Protocol_Factory *factory)
virtual int connect (TAO_FlowSpec_Entry *entry, TAO_AV_Transport *&transport, TAO_AV_Core::Flow_Component flow_comp=TAO_AV_Core::TAO_AV_DATA)
virtual int close (void)
virtual int make_svc_handler (TAO_AV_TCP_Flow_Handler *&handler)

Protected Attributes

TAO_AV_Coreav_core_
TAO_AV_TCP_Base_Connector connector_
TAO_Base_StreamEndPointendpoint_
TAO_FlowSpec_Entryentry_
TAO_AV_Flow_Protocol_Factoryflow_protocol_factory_

Detailed Description

Definition at line 198 of file TCP.h.


Constructor & Destructor Documentation

TAO_AV_TCP_Connector::TAO_AV_TCP_Connector ( void   ) 

Definition at line 360 of file TCP.cpp.

{
}

TAO_AV_TCP_Connector::~TAO_AV_TCP_Connector ( void   )  [virtual]

Definition at line 364 of file TCP.cpp.

{
}


Member Function Documentation

int TAO_AV_TCP_Connector::close ( void   )  [virtual]

Implements TAO_AV_Connector.

Definition at line 434 of file TCP.cpp.

{
  return 0;
}

int TAO_AV_TCP_Connector::connect ( TAO_FlowSpec_Entry entry,
TAO_AV_Transport *&  transport,
TAO_AV_Core::Flow_Component  flow_comp = TAO_AV_Core::TAO_AV_DATA 
) [virtual]

Implements TAO_AV_Connector.

Definition at line 412 of file TCP.cpp.

{
  this->entry_ = entry;
  if (flow_comp == TAO_AV_Core::TAO_AV_CONTROL)
    this->flowname_ = TAO_AV_Core::get_control_flowname (entry->flowname ());
  else
  this->flowname_ = entry->flowname ();
  ACE_Addr *remote_addr = entry->address ();
  ACE_INET_Addr *inet_addr = dynamic_cast<ACE_INET_Addr *> (remote_addr);
  TAO_AV_TCP_Flow_Handler *handler = 0;
  int result = this->connector_.connector_connect (handler,
                                                   *inet_addr);
  if (result < 0)
    ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_connector::connect failed\n"),-1);
  entry->handler (handler);
  transport = handler->transport ();
  return 0;
}

int TAO_AV_TCP_Connector::make_svc_handler ( TAO_AV_TCP_Flow_Handler *&  handler  )  [virtual]

Definition at line 369 of file TCP.cpp.

{
  if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_TCP_Connector::make_svc_handler\n"));
  //  TAO_AV_Callback *callback = 0;
  if (this->endpoint_ != 0)
    {
//       this->endpoint_->get_callback (this->flowname_.c_str (),
//                                      callback);
      ACE_NEW_RETURN (tcp_handler,
                      //                      TAO_AV_TCP_Flow_Handler (callback),
                      TAO_AV_TCP_Flow_Handler,
                      -1);
      TAO_AV_Protocol_Object *object =
        this->flow_protocol_factory_->make_protocol_object (this->entry_,
                                                            this->endpoint_,
                                                            tcp_handler,
                                                            tcp_handler->transport ());
      tcp_handler->protocol_object (object);
      //      callback->protocol_object (object);
//       this->endpoint_->set_protocol_object (this->flowname_.c_str (),
//                                             object);
      this->endpoint_->set_flow_handler (this->flowname_.c_str (),tcp_handler);
      this->entry_->protocol_object (object);
      this->entry_->handler (tcp_handler);
    }
  return 0;
}

int TAO_AV_TCP_Connector::open ( TAO_Base_StreamEndPoint endpoint,
TAO_AV_Core av_core,
TAO_AV_Flow_Protocol_Factory factory 
) [virtual]

Implements TAO_AV_Connector.

Definition at line 398 of file TCP.cpp.

{
  this->endpoint_ = endpoint;
  this->flow_protocol_factory_ = factory;
  if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_TCP_Connector::open "));
  int result = this->connector_.connector_open(this,
                                               av_core->reactor ());
  return result;
}


Member Data Documentation

Definition at line 215 of file TCP.h.

Definition at line 216 of file TCP.h.

Definition at line 217 of file TCP.h.

Definition at line 218 of file TCP.h.

Definition at line 219 of file TCP.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines