TAO_AV_Protocol_Object for the User Datagram Protocol (UDP). More...
#include <UDP.h>
Public Member Functions | |
TAO_AV_UDP_Object (TAO_AV_Callback *callback, TAO_AV_Transport *transport=0) | |
virtual | ~TAO_AV_UDP_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. | |
Private Attributes | |
ACE_Message_Block | frame_ |
Pre-allocated memory to receive the data... |
TAO_AV_Protocol_Object for the User Datagram Protocol (UDP).
Definition at line 233 of file UDP.h.
TAO_AV_UDP_Object::TAO_AV_UDP_Object | ( | TAO_AV_Callback * | callback, | |
TAO_AV_Transport * | transport = 0 | |||
) |
Definition at line 1012 of file UDP.cpp.
:TAO_AV_Protocol_Object (callback,transport) { this->frame_.size (this->transport_->mtu ()); }
TAO_AV_UDP_Object::~TAO_AV_UDP_Object | ( | void | ) | [virtual] |
int TAO_AV_UDP_Object::destroy | ( | void | ) | [virtual] |
end the stream.
Implements TAO_AV_Protocol_Object.
Definition at line 1025 of file UDP.cpp.
{ this->callback_->handle_destroy (); delete this; return 0; }
int TAO_AV_UDP_Object::handle_input | ( | void | ) | [virtual] |
Implements TAO_AV_Protocol_Object.
Definition at line 967 of file UDP.cpp.
{ int n = this->transport_->recv (this->frame_.rd_ptr (), this->frame_.size ()); if (n == -1) ACE_ERROR_RETURN ((LM_ERROR,"(%N,%l) TAO_AV_UDP_Flow_Handler::handle_input recv failed: errno: %m\n"),-1); this->frame_.wr_ptr (this->frame_.rd_ptr () + n); return this->callback_->receive_frame (&this->frame_); }
int TAO_AV_UDP_Object::send_frame | ( | const char * | buf, | |
size_t | len | |||
) | [virtual] |
Implements TAO_AV_Protocol_Object.
Definition at line 1003 of file UDP.cpp.
{ int const result = this->transport_->send (buf, len, 0); if (result < 0) return result; return 0; }
int TAO_AV_UDP_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 992 of file UDP.cpp.
{ int const result = this->transport_->send (iov,iovcnt); if (result < 0) return result; return 0; }
int TAO_AV_UDP_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 980 of file UDP.cpp.
{ if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"TAO_AV_UDP_Object::send_frame\n")); int const result = this->transport_->send (frame); if (result < 0) return result; return 0; }
ACE_Message_Block TAO_AV_UDP_Object::frame_ [private] |