Public Member Functions | Public Attributes

TAO_AV_TCP_Object Class Reference

TAO_AV_Protocol_Object for Transmission Control Protocol (TCP). More...

#include <TCP.h>

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

List of all members.

Public Member Functions

 TAO_AV_TCP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport=0)
virtual ~TAO_AV_TCP_Object (void)
 Dtor.
virtual int handle_input (void)
virtual int send_frame (ACE_Message_Block *frame, TAO_AV_frame_info *frame_info=0)
 send a data frame.
virtual int send_frame (const iovec *iov, int iovcnt, TAO_AV_frame_info *frame_info=0)
 send a frame in iovecs.
virtual int send_frame (const char *buf, size_t len)
virtual int destroy (void)
 end the stream.

Public Attributes

ACE_Message_Block frame_
 Pre-allocated memory to receive the data...

Detailed Description

TAO_AV_Protocol_Object for Transmission Control Protocol (TCP).

Definition at line 226 of file TCP.h.


Constructor & Destructor Documentation

TAO_AV_TCP_Object::TAO_AV_TCP_Object ( TAO_AV_Callback callback,
TAO_AV_Transport transport = 0 
)

Definition at line 244 of file TCP.cpp.

  :TAO_AV_Protocol_Object (callback,transport)
{
  // @@ Is this a good size?
  this->frame_.size (BUFSIZ);
}

TAO_AV_TCP_Object::~TAO_AV_TCP_Object ( void   )  [virtual]

Dtor.

Definition at line 252 of file TCP.cpp.

{
  // No-op
}


Member Function Documentation

int TAO_AV_TCP_Object::destroy ( void   )  [virtual]

end the stream.

Implements TAO_AV_Protocol_Object.

Definition at line 257 of file TCP.cpp.

{
  this->callback_->handle_destroy ();
  delete this;
  return 0;
}

int TAO_AV_TCP_Object::handle_input ( void   )  [virtual]

Implements TAO_AV_Protocol_Object.

Definition at line 206 of file TCP.cpp.

{
  int n = this->transport_->recv (this->frame_.rd_ptr (),
                                  this->frame_.size ());
  if (n == -1)
    ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input recv failed\n"),-1);
  if (n == 0)
    ACE_ERROR_RETURN ((LM_DEBUG,"TAO_AV_TCP_Flow_Handler::handle_input connection closed\n"),-1);
  this->frame_.wr_ptr (this->frame_.rd_ptr () + n);

  return this->callback_->receive_frame (&this->frame_);
}

int TAO_AV_TCP_Object::send_frame ( const char *  buf,
size_t  len 
) [virtual]

Implements TAO_AV_Protocol_Object.

Definition at line 236 of file TCP.cpp.

{
  int result = this->transport_->send (buf, len, 0);
  return result;
}

int TAO_AV_TCP_Object::send_frame ( const iovec *  iov,
int  iovcnt,
TAO_AV_frame_info frame_info = 0 
) [virtual]

send a frame in iovecs.

Implements TAO_AV_Protocol_Object.

Definition at line 228 of file TCP.cpp.

{
  return this->transport_->send (iov,iovcnt);
}

int TAO_AV_TCP_Object::send_frame ( ACE_Message_Block frame,
TAO_AV_frame_info frame_info = 0 
) [virtual]

send a data frame.

Implements TAO_AV_Protocol_Object.

Definition at line 220 of file TCP.cpp.

{
  int result = this->transport_->send (frame);
  return result;
}


Member Data Documentation

Pre-allocated memory to receive the data...

Definition at line 253 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