TAO_AV_Protocol_Object for Transmission Control Protocol (TCP). More...
#include <TCP.h>
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... |
TAO_AV_Protocol_Object for Transmission Control Protocol (TCP).
Definition at line 226 of file TCP.h.
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] |
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; }