code: private void setSocketOptions() throws SocketException {
          if (DISABLE_NAGLES) {
              // Disable Nagle's algorithm (significant on Windows).
              m_socket.setTcpNoDelay(true);
              m_logger.debug("Nagle's algorithm disabled.");
          }
          if (USE_CUSTOM_BUFFER_SIZE) {
              // Improve default send/receive buffer sizes from default (often 8K).
              if (m_socket.getSendBufferSize() < NET_BUFFER_SIZE) {
                  m_logger.debug("SendBufferSize increased from {} to {}",
                                 m_socket.getSendBufferSize(), NET_BUFFER_SIZE);
                  m_socket.setSendBufferSize(NET_BUFFER_SIZE);
              }
              if (m_socket.getReceiveBufferSize() < NET_BUFFER_SIZE) {
                  m_logger.debug("ReceiveBufferSize increased from {} to {}",
                                 m_socket.getReceiveBufferSize(), NET_BUFFER_SIZE);
                  m_socket.setReceiveBufferSize(NET_BUFFER_SIZE);
              }
          }
      }
docs: Customize socket options