2 //=============================================================================
6 * @author Carlos O'Ryan
8 //=============================================================================
13 #include "orbsvcs/AV/AVStreams_i.h"
14 #include "orbsvcs/AV/Policy.h"
15 #include "orbsvcs/AV/Flows_T.h"
17 class Pong_Recv_Callback
: public TAO_AV_Callback
20 virtual int handle_stop ();
21 virtual int receive_frame (ACE_Message_Block
*frame
,
22 TAO_AV_frame_info
*frame_info
= 0,
23 const ACE_Addr
&peer_address
= ACE_Addr::sap_any
);
24 virtual int handle_destroy ();
27 class Pong_Recv
: public TAO_FlowConsumer
32 virtual int get_callback (const char *flowname
,
33 TAO_AV_Callback
*&callback
);
36 /// The callback object...
37 Pong_Recv_Callback callback_
;
40 class Ping_Send_Callback
: public TAO_AV_Callback
43 Ping_Send_Callback ();
45 virtual int handle_timeout (void *arg
);
46 virtual int handle_end_stream ();
47 virtual void get_timeout (ACE_Time_Value
*&tv
,
52 ACE_Time_Value timeout_
;
54 /// Pre-allocate the message block to send...
55 ACE_Message_Block frame_
;
59 class Ping_Send
: public TAO_FlowProducer
63 virtual int get_callback (const char *flowname
,
64 TAO_AV_Callback
*&callback
);
67 /// The callback object...
68 Ping_Send_Callback callback_
;
71 typedef TAO_AV_Endpoint_Reactive_Strategy_A
<TAO_StreamEndPoint_A
,TAO_VDev
,AV_Null_MediaCtrl
> Reactive_Strategy
;
73 typedef TAO_FDev
<TAO_FlowProducer
,Pong_Recv
> Pong_Recv_FDev
;
74 typedef TAO_FDev
<Ping_Send
,TAO_FlowConsumer
> Ping_Send_FDev
;
76 #endif /* TAO_PONG_H */