|
|
@ -98,6 +98,7 @@ static int mode = TCP_ONLY; |
|
|
|
static int nofile = 0; |
|
|
|
#endif |
|
|
|
static int fast_open = 0; |
|
|
|
static int no_delay = 0; |
|
|
|
|
|
|
|
static struct ev_signal sigint_watcher; |
|
|
|
static struct ev_signal sigterm_watcher; |
|
|
@ -437,7 +438,7 @@ remote_recv_cb(EV_P_ ev_io *w, int revents) |
|
|
|
} |
|
|
|
|
|
|
|
// Disable TCP_NODELAY after the first response are sent |
|
|
|
if (!remote->recv_ctx->connected) { |
|
|
|
if (!remote->recv_ctx->connected && !no_delay) { |
|
|
|
int opt = 0; |
|
|
|
setsockopt(server->fd, SOL_TCP, TCP_NODELAY, &opt, sizeof(opt)); |
|
|
|
setsockopt(remote->fd, SOL_TCP, TCP_NODELAY, &opt, sizeof(opt)); |
|
|
@ -905,6 +906,7 @@ main(int argc, char **argv) |
|
|
|
{ "plugin", required_argument, NULL, GETOPT_VAL_PLUGIN }, |
|
|
|
{ "plugin-opts", required_argument, NULL, GETOPT_VAL_PLUGIN_OPTS }, |
|
|
|
{ "reuse-port", no_argument, NULL, GETOPT_VAL_REUSE_PORT }, |
|
|
|
{ "no-delay", no_argument, NULL, GETOPT_VAL_NODELAY }, |
|
|
|
{ "password", required_argument, NULL, GETOPT_VAL_PASSWORD }, |
|
|
|
{ "key", required_argument, NULL, GETOPT_VAL_KEY }, |
|
|
|
{ "help", no_argument, NULL, GETOPT_VAL_HELP }, |
|
|
@ -929,6 +931,10 @@ main(int argc, char **argv) |
|
|
|
mptcp = 1; |
|
|
|
LOGI("enable multipath TCP"); |
|
|
|
break; |
|
|
|
case GETOPT_VAL_NODELAY: |
|
|
|
no_delay = 1; |
|
|
|
LOGI("enable TCP no-delay"); |
|
|
|
break; |
|
|
|
case GETOPT_VAL_PLUGIN: |
|
|
|
plugin = optarg; |
|
|
|
break; |
|
|
|