Просмотр исходного кода

server : disable Nagle's algorithm (#12020)

Georgi Gerganov 10 месяцев назад
Родитель
Сommit
cf756d6e0a
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      examples/server/utils.hpp

+ 2 - 0
examples/server/utils.hpp

@@ -7,6 +7,8 @@
 
 
 // increase max payload length to allow use of larger context size
 // increase max payload length to allow use of larger context size
 #define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
 #define CPPHTTPLIB_FORM_URL_ENCODED_PAYLOAD_MAX_LENGTH 1048576
+// disable Nagle's algorithm
+#define CPPHTTPLIB_TCP_NODELAY true
 #include "httplib.h"
 #include "httplib.h"
 
 
 // Change JSON_ASSERT from assert() to GGML_ASSERT:
 // Change JSON_ASSERT from assert() to GGML_ASSERT: