#include <TCP.h>
Inheritance diagram for TAO_AV_TCP_Object:
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. | |
Private Attributes | |
ACE_Message_Block | frame_ |
Pre-allocated memory to receive the data... |
Definition at line 226 of file TCP.h.
|
Definition at line 244 of file TCP.cpp. References ACE_Message_Block::size().
00246 :TAO_AV_Protocol_Object (callback,transport) 00247 { 00248 // @@ Is this a good size? 00249 this->frame_.size (BUFSIZ); 00250 } |
|
Dtor.
Definition at line 252 of file TCP.cpp.
00253 {
00254 // No-op
00255 }
|
|
end the stream.
Implements TAO_AV_Protocol_Object. Definition at line 257 of file TCP.cpp. References TAO_AV_Callback::handle_destroy().
00258 { 00259 this->callback_->handle_destroy (); 00260 delete this; 00261 return 0; 00262 } |
|
Implements TAO_AV_Protocol_Object. Definition at line 206 of file TCP.cpp. References ACE_ERROR_RETURN, LM_ERROR, TAO_AV_Callback::receive_frame(), TAO_AV_Transport::recv(), ACE_Message_Block::size(), and ACE_Message_Block::wr_ptr().
00207 { 00208 int n = this->transport_->recv (this->frame_.rd_ptr (), 00209 this->frame_.size ()); 00210 if (n == -1) 00211 ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input recv failed\n"),-1); 00212 if (n == 0) 00213 ACE_ERROR_RETURN ((LM_ERROR,"TAO_AV_TCP_Flow_Handler::handle_input connection closed\n"),-1); 00214 this->frame_.wr_ptr (this->frame_.rd_ptr () + n); 00215 00216 return this->callback_->receive_frame (&this->frame_); 00217 } |
|
Implements TAO_AV_Protocol_Object. Definition at line 236 of file TCP.cpp. References TAO_AV_Transport::send().
00238 { 00239 int result = this->transport_->send (buf, len, 0); 00240 return result; 00241 } |
|
send a frame in iovecs.
Implements TAO_AV_Protocol_Object. Definition at line 228 of file TCP.cpp. References TAO_AV_Transport::send().
00231 { 00232 return this->transport_->send (iov,iovcnt); 00233 } |
|
send a data frame.
Implements TAO_AV_Protocol_Object. Definition at line 220 of file TCP.cpp. References TAO_AV_Transport::send().
00222 { 00223 int result = this->transport_->send (frame); 00224 return result; 00225 } |
|
Pre-allocated memory to receive the data...
|