瀏覽代碼

set port = -1 if use Unix Domain Socket

ithewei 3 年之前
父節點
當前提交
350979122d
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      examples/tcp_echo_server.c
  2. 1 0
      examples/udp_echo_server.c

+ 1 - 0
examples/tcp_echo_server.c

@@ -102,6 +102,7 @@ int main(int argc, char** argv) {
 #if ENABLE_UDS
     if (port == 0) {
         host = argv[1];
+        port = -1;
     }
 #endif
 

+ 1 - 0
examples/udp_echo_server.c

@@ -53,6 +53,7 @@ int main(int argc, char** argv) {
 #if ENABLE_UDS
     if (port == 0) {
         host = argv[1];
+        port = -1;
     }
 #endif