Skip to content

Commit 4201dd8

Browse files
author
ubuntu
committed
remove CCAPI_SOCKET_SEND_BUFFER_SIZE and CCAPI_SOCKET_RECEIVE_BUFFER_SIZE
1 parent ec47d14 commit 4201dd8

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

include/ccapi_cpp/service/ccapi_service.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727
#define CCAPI_WEBSOCKET_WRITE_BUFFER_SIZE (1 << 20)
2828
#endif
2929

30-
#ifndef CCAPI_SOCKET_SEND_BUFFER_SIZE
31-
#define CCAPI_SOCKET_SEND_BUFFER_SIZE (1 << 20)
32-
#endif
33-
34-
#ifndef CCAPI_SOCKET_RECEIVE_BUFFER_SIZE
35-
#define CCAPI_SOCKET_RECEIVE_BUFFER_SIZE (1 << 20)
36-
#endif
37-
3830
#include <regex>
3931

4032
#include "boost/asio/strand.hpp"
@@ -1050,12 +1042,8 @@ class Service : public std::enable_shared_from_this<Service> {
10501042

10511043
auto& lowestLayer = beast::get_lowest_layer(*streamPtr).socket();
10521044

1053-
// Disable Nagle
1054-
lowestLayer.set_option(tcp::no_delay(true));
1055-
1056-
// Set buffer sizes (example: 1 MB)
1057-
lowestLayer.set_option(boost::asio::socket_base::send_buffer_size(CCAPI_SOCKET_SEND_BUFFER_SIZE));
1058-
lowestLayer.set_option(boost::asio::socket_base::receive_buffer_size(CCAPI_SOCKET_RECEIVE_BUFFER_SIZE));
1045+
// Disable Nagle
1046+
lowestLayer.set_option(tcp::no_delay(true));
10591047

10601048
if constexpr (std::is_same_v<StreamType, beast::websocket::stream<beast::ssl_stream<beast::tcp_stream>>>) {
10611049
CCAPI_LOGGER_TRACE("before ssl async_handshake");

0 commit comments

Comments
 (0)