ShmemReceiveStrategy.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 OPENDDS_SHMEMRECEIVESTRATEGY_H
00009 #define OPENDDS_SHMEMRECEIVESTRATEGY_H
00010 
00011 #include "Shmem_Export.h"
00012 
00013 #include "ace/Event_Handler.h"
00014 #include "ace/INET_Addr.h"
00015 
00016 #include "dds/DCPS/transport/framework/TransportReceiveStrategy_T.h"
00017 
00018 namespace OpenDDS {
00019 namespace DCPS {
00020 
00021 class ShmemDataLink;
00022 struct ShmemData;
00023 
00024 class OpenDDS_Shmem_Export ShmemReceiveStrategy
00025   : public TransportReceiveStrategy<> {
00026 public:
00027   explicit ShmemReceiveStrategy(ShmemDataLink* link);
00028 
00029   void read();
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 void deliver_sample(ReceivedDataSample& sample,
00038                               const ACE_INET_Addr& remote_address);
00039 
00040   virtual int start_i();
00041   virtual void stop_i();
00042 
00043 private:
00044   ShmemDataLink* link_;
00045   std::string bound_name_;
00046   ShmemData* current_data_;
00047   size_t partial_recv_remaining_;
00048   const char* partial_recv_ptr_;
00049 };
00050 
00051 } // namespace DCPS
00052 } // namespace OpenDDS
00053 
00054 #endif  /* OPENDDS_SHMEMRECEIVESTRATEGY_H */

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