MulticastReceiveStrategy.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef DCPS_MULTICASTRECEIVESTRATEGY_H
00009 #define DCPS_MULTICASTRECEIVESTRATEGY_H
00010 
00011 #include "Multicast_Export.h"
00012 
00013 #include "ace/Event_Handler.h"
00014 
00015 #include "dds/DCPS/transport/framework/TransportReceiveStrategy_T.h"
00016 
00017 namespace OpenDDS {
00018 namespace DCPS {
00019 
00020 class MulticastDataLink;
00021 
00022 class OpenDDS_Multicast_Export MulticastReceiveStrategy
00023   : public TransportReceiveStrategy<>,
00024     public ACE_Event_Handler {
00025 public:
00026   explicit MulticastReceiveStrategy(MulticastDataLink* link);
00027 
00028   virtual ACE_HANDLE get_handle() const;
00029   virtual int handle_input(ACE_HANDLE fd);
00030 
00031 protected:
00032   virtual ssize_t receive_bytes(iovec iov[],
00033                                 int n,
00034                                 ACE_INET_Addr& remote_address,
00035                                 ACE_HANDLE fd);
00036 
00037   virtual bool check_header(const TransportHeader& header);
00038   virtual bool check_header(const DataSampleHeader& header);
00039 
00040   virtual void deliver_sample(ReceivedDataSample& sample,
00041                               const ACE_INET_Addr& remote_address);
00042 
00043   virtual int start_i();
00044   virtual void stop_i();
00045 
00046   virtual bool reassemble(ReceivedDataSample& data);
00047 
00048 private:
00049   MulticastDataLink* link_;
00050 };
00051 
00052 } // namespace DCPS
00053 } // namespace OpenDDS
00054 
00055 #endif  /* DCPS_MULTICASTRECEIVESTRATEGY_H */

Generated on Fri Feb 12 20:05:24 2016 for OpenDDS by  doxygen 1.4.7