diff src/http/ngx_http_core_module.c @ 8166:7999d3fbb765 quic

HTTP UDP layer, QUIC support autotest.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 28 Feb 2020 13:09:51 +0300
parents f001d9384293
children 5d91389e0fd3
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3800,6 +3800,7 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
     ngx_memzero(&lsopt, sizeof(ngx_http_listen_opt_t));
 
     lsopt.backlog = NGX_LISTEN_BACKLOG;
+    lsopt.type = SOCK_STREAM;
     lsopt.rcvbuf = -1;
     lsopt.sndbuf = -1;
 #if (NGX_HAVE_SETFIB)
@@ -3821,6 +3822,11 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx
             continue;
         }
 
+        if (ngx_strcmp(value[n].data, "quic") == 0) {
+            lsopt.type = SOCK_DGRAM;
+            continue;
+        }
+
         if (ngx_strcmp(value[n].data, "bind") == 0) {
             lsopt.set = 1;
             lsopt.bind = 1;