File tree Expand file tree Collapse file tree 8 files changed +22
-21
lines changed Expand file tree Collapse file tree 8 files changed +22
-21
lines changed Original file line number Diff line number Diff line change @@ -317,8 +317,11 @@ void RTPSParticipantAttributes::setup_transports(
317
317
}
318
318
bool intraprocess_only = is_intraprocess_only (*this );
319
319
320
- sendSocketBufferSize = options.sockets_buffer_size ;
321
- listenSocketBufferSize = options.sockets_buffer_size ;
320
+ if (options.sockets_buffer_size != 0 )
321
+ {
322
+ sendSocketBufferSize = options.sockets_buffer_size ;
323
+ listenSocketBufferSize = options.sockets_buffer_size ;
324
+ }
322
325
323
326
switch (transports)
324
327
{
Original file line number Diff line number Diff line change @@ -87,10 +87,9 @@ struct asio_helpers
87
87
if (!ec)
88
88
{
89
89
// Last attempt was successful. Get the actual value set.
90
- int32_t max_value = static_cast <int32_t >(initial_buffer_value);
91
90
BufferOptionType option;
92
91
socket.get_option (option, ec);
93
- if (!ec && (option.value () >= value_to_set) && (option. value () <= max_value) )
92
+ if (!ec && (option.value () >= value_to_set))
94
93
{
95
94
final_buffer_value = option.value ();
96
95
return true ;
Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ test_UDPv4Transport::test_UDPv4Transport(
65
65
{
66
66
test_UDPv4Transport_DropLogLength = 0 ;
67
67
test_UDPv4Transport_ShutdownAllNetwork = false ;
68
- UDPv4Transport::mSendBufferSize = descriptor.sendBufferSize ;
69
- UDPv4Transport::mReceiveBufferSize = descriptor.receiveBufferSize ;
68
+ UDPv4Transport::configuration_.sendBufferSize = descriptor.sendBufferSize ;
69
+ UDPv4Transport::configuration_.receiveBufferSize = descriptor.receiveBufferSize ;
70
+ UDPv4Transport::configuration_.maxMessageSize = descriptor.maxMessageSize ;
70
71
for (auto interf : descriptor.interfaceWhiteList )
71
72
{
72
73
UDPv4Transport::interface_whitelist_.emplace_back (asio::ip::make_address_v4 (interf));
Original file line number Diff line number Diff line change @@ -1395,10 +1395,10 @@ class PubSubReader
1395
1395
}
1396
1396
1397
1397
PubSubReader& socket_buffer_size (
1398
- uint32_t sockerBufferSize )
1398
+ uint32_t socketBufferSize )
1399
1399
{
1400
- participant_qos_.transport ().listen_socket_buffer_size = sockerBufferSize ;
1401
- participant_qos_.transport ().send_socket_buffer_size = sockerBufferSize ;
1400
+ participant_qos_.transport ().listen_socket_buffer_size = socketBufferSize ;
1401
+ participant_qos_.transport ().send_socket_buffer_size = socketBufferSize ;
1402
1402
return *this ;
1403
1403
}
1404
1404
Original file line number Diff line number Diff line change @@ -1547,10 +1547,10 @@ class PubSubWriter
1547
1547
}
1548
1548
1549
1549
PubSubWriter& socket_buffer_size (
1550
- uint32_t sockerBufferSize )
1550
+ uint32_t socketBufferSize )
1551
1551
{
1552
- participant_qos_.transport ().listen_socket_buffer_size = sockerBufferSize ;
1553
- participant_qos_.transport ().send_socket_buffer_size = sockerBufferSize ;
1552
+ participant_qos_.transport ().listen_socket_buffer_size = socketBufferSize ;
1553
+ participant_qos_.transport ().send_socket_buffer_size = socketBufferSize ;
1554
1554
return *this ;
1555
1555
}
1556
1556
Original file line number Diff line number Diff line change @@ -1102,10 +1102,10 @@ class PubSubReader
1102
1102
}
1103
1103
1104
1104
PubSubReader& socket_buffer_size (
1105
- uint32_t sockerBufferSize )
1105
+ uint32_t socketBufferSize )
1106
1106
{
1107
- participant_attr_.rtps .listenSocketBufferSize = sockerBufferSize ;
1108
- participant_attr_.rtps .sendSocketBufferSize = sockerBufferSize ;
1107
+ participant_attr_.rtps .listenSocketBufferSize = socketBufferSize ;
1108
+ participant_attr_.rtps .sendSocketBufferSize = socketBufferSize ;
1109
1109
return *this ;
1110
1110
}
1111
1111
Original file line number Diff line number Diff line change @@ -1281,10 +1281,10 @@ class PubSubWriter
1281
1281
}
1282
1282
1283
1283
PubSubWriter& socket_buffer_size (
1284
- uint32_t sockerBufferSize )
1284
+ uint32_t socketBufferSize )
1285
1285
{
1286
- participant_attr_.rtps .listenSocketBufferSize = sockerBufferSize ;
1287
- participant_attr_.rtps .sendSocketBufferSize = sockerBufferSize ;
1286
+ participant_attr_.rtps .listenSocketBufferSize = socketBufferSize ;
1287
+ participant_attr_.rtps .sendSocketBufferSize = socketBufferSize ;
1288
1288
return *this ;
1289
1289
}
1290
1290
Original file line number Diff line number Diff line change @@ -776,6 +776,7 @@ void sample_lost_test_dr_init(
776
776
PubSubReader<T>& reader,
777
777
std::function<void (const eprosima::fastdds::dds::SampleLostStatus& status)> functor)
778
778
{
779
+ reader.socket_buffer_size (SAMPLE_LOST_TEST_BUFFER_SIZE);
779
780
reader.sample_lost_status_functor (functor)
780
781
.init ();
781
782
@@ -788,9 +789,6 @@ void sample_lost_test_init(
788
789
PubSubWriter<T>& writer,
789
790
std::function<void (const eprosima::fastdds::dds::SampleLostStatus& status)> functor)
790
791
{
791
- reader.socket_buffer_size (SAMPLE_LOST_TEST_BUFFER_SIZE);
792
- writer.socket_buffer_size (SAMPLE_LOST_TEST_BUFFER_SIZE);
793
-
794
792
sample_lost_test_dw_init (writer);
795
793
sample_lost_test_dr_init (reader, functor);
796
794
You can’t perform that action at this time.
0 commit comments