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/INET_Addr.h"
00014 
00015 #include "dds/DCPS/transport/framework/TransportReceiveStrategy_T.h"
00016 
00017 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00018 
00019 namespace OpenDDS {
00020 namespace DCPS {
00021 
00022 class ShmemDataLink;
00023 struct ShmemData;
00024 
00025 class OpenDDS_Shmem_Export ShmemReceiveStrategy
00026   : public TransportReceiveStrategy<> {
00027 public:
00028   explicit ShmemReceiveStrategy(ShmemDataLink* link);
00029 
00030   void read();
00031 
00032 protected:
00033   virtual ssize_t receive_bytes(iovec iov[],
00034                                 int n,
00035                                 ACE_INET_Addr& remote_address,
00036                                 ACE_HANDLE fd);
00037 
00038   virtual void deliver_sample(ReceivedDataSample& sample,
00039                               const ACE_INET_Addr& remote_address);
00040 
00041   virtual int start_i();
00042   virtual void stop_i();
00043 
00044 private:
00045   ShmemDataLink* link_;
00046   std::string bound_name_;
00047   ShmemData* current_data_;
00048   size_t partial_recv_remaining_;
00049   const char* partial_recv_ptr_;
00050 };
00051 
00052 } // namespace DCPS
00053 } // namespace OpenDDS
00054 
00055 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00056 
00057 #endif  /* OPENDDS_SHMEMRECEIVESTRATEGY_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1