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 "dds/DCPS/RcEventHandler.h"
00014 #include "dds/DCPS/transport/framework/TransportReceiveStrategy_T.h"
00015 
00016 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00017 
00018 namespace OpenDDS {
00019 namespace DCPS {
00020 
00021 class MulticastDataLink;
00022 
00023 class OpenDDS_Multicast_Export MulticastReceiveStrategy
00024   : public TransportReceiveStrategy<>,
00025     public RcEventHandler
00026 {
00027 public:
00028   explicit MulticastReceiveStrategy(MulticastDataLink* link);
00029 
00030   virtual ACE_HANDLE get_handle() const;
00031   virtual int handle_input(ACE_HANDLE fd);
00032 
00033 protected:
00034   virtual ssize_t receive_bytes(iovec iov[],
00035                                 int n,
00036                                 ACE_INET_Addr& remote_address,
00037                                 ACE_HANDLE fd);
00038 
00039   virtual bool check_header(const TransportHeader& header);
00040   virtual bool check_header(const DataSampleHeader& header);
00041 
00042   virtual void deliver_sample(ReceivedDataSample& sample,
00043                               const ACE_INET_Addr& remote_address);
00044 
00045   virtual int start_i();
00046   virtual void stop_i();
00047 
00048   virtual bool reassemble(ReceivedDataSample& data);
00049 
00050 private:
00051   MulticastDataLink* link_;
00052 };
00053 
00054 } // namespace DCPS
00055 } // namespace OpenDDS
00056 
00057 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00058 
00059 #endif  /* DCPS_MULTICASTRECEIVESTRATEGY_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1