OpenDDS  Snapshot(2023/04/28-20:55)
ShmemReceiveStrategy.h
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMRECEIVESTRATEGY_H
9 #define OPENDDS_DCPS_TRANSPORT_SHMEM_SHMEMRECEIVESTRATEGY_H
10 
11 #include "Shmem_Export.h"
12 
13 #include "ace/INET_Addr.h"
14 
16 
18 
19 namespace OpenDDS {
20 namespace DCPS {
21 
22 class ShmemDataLink;
23 struct ShmemData;
24 
26  : public TransportReceiveStrategy<> {
27 public:
28  explicit ShmemReceiveStrategy(ShmemDataLink* link);
29 
30  void read();
31 
32 protected:
33  virtual ssize_t receive_bytes(iovec iov[],
34  int n,
35  ACE_INET_Addr& remote_address,
36  ACE_HANDLE fd,
37  bool& stop);
38 
39  virtual void deliver_sample(ReceivedDataSample& sample,
40  const ACE_INET_Addr& remote_address);
41 
42  virtual int start_i();
43  virtual void stop_i();
44 
45 private:
47  std::string bound_name_;
50  const char* partial_recv_ptr_;
52 };
53 
54 } // namespace DCPS
55 } // namespace OpenDDS
56 
58 
59 #endif /* OPENDDS_SHMEMRECEIVESTRATEGY_H */
int ssize_t
Holds a data sample received by the transport.
ssize_t read(ACE_HANDLE handle, void *buf, size_t len)
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
#define OpenDDS_Shmem_Export
Definition: Shmem_Export.h:25