Fast DDS  Version 3.6.1.0
Fast DDS
ChainingTransportDescriptor.hpp
1 // Copyright 2021 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
20 #ifndef FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
21 #define FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
22 
23 #include <memory>
24 #include <vector>
25 
26 #include "TransportInterface.hpp"
27 
28 namespace eprosima {
29 namespace fastdds {
30 namespace rtps {
31 
43 {
44  FASTDDS_EXPORTED_API ChainingTransportDescriptor(
45  std::shared_ptr<TransportDescriptorInterface> low_level)
47  , low_level_descriptor(low_level)
48  {
49  }
50 
51  FASTDDS_EXPORTED_API ChainingTransportDescriptor(
55  {
56  }
57 
59  FASTDDS_EXPORTED_API virtual uint32_t min_send_buffer_size() const override
60  {
61  return low_level_descriptor->min_send_buffer_size();
62  }
63 
65  FASTDDS_EXPORTED_API virtual uint32_t max_message_size() const override
66  {
67  return low_level_descriptor->max_message_size();
68  }
69 
70  FASTDDS_EXPORTED_API virtual ~ChainingTransportDescriptor() = default;
71 
73  std::shared_ptr<TransportDescriptorInterface> low_level_descriptor;
75 
76 } // namespace rtps
77 } // namespace fastdds
78 } // namespace eprosima
79 
80 #endif // FASTDDS_RTPS_TRANSPORT__CHAININGTRANSPORTDESCRIPTOR_HPP
eprosima::fastdds::rtps::ChainingTransportDescriptor ChainingTransportDescriptor
Base class for the descriptors of chaining transports.
Base class for the descriptors of chaining transports.
Definition: ChainingTransportDescriptor.hpp:43
std::shared_ptr< TransportDescriptorInterface > low_level_descriptor
Descriptor for lower level transport.
Definition: ChainingTransportDescriptor.hpp:73
virtual FASTDDS_EXPORTED_API uint32_t min_send_buffer_size() const override
Returns the minimum size required for a send operation.
Definition: ChainingTransportDescriptor.hpp:59
FASTDDS_EXPORTED_API ChainingTransportDescriptor(const ChainingTransportDescriptor &t)
Definition: ChainingTransportDescriptor.hpp:51
FASTDDS_EXPORTED_API ChainingTransportDescriptor(std::shared_ptr< TransportDescriptorInterface > low_level)
Definition: ChainingTransportDescriptor.hpp:44
virtual FASTDDS_EXPORTED_API uint32_t max_message_size() const override
Returns the maximum size expected for received messages.
Definition: ChainingTransportDescriptor.hpp:65
virtual FASTDDS_EXPORTED_API ~ChainingTransportDescriptor()=default
Virtual base class for the data type used to define transport configuration.
Definition: TransportDescriptorInterface.hpp:48
uint32_t maxMessageSize
Maximum size of a single message in the transport.
Definition: TransportDescriptorInterface.hpp:123
uint32_t maxInitialPeersRange
Number of channels opened with each initial remote peer.
Definition: TransportDescriptorInterface.hpp:126