diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-13 19:24:33 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-13 19:24:33 +0800 |
commit | 6d8dcf7a7c0db67da322243d049ad8a4255f7f1c (patch) | |
tree | 898e17aeb63deaf446e5fdfe6206ad9a7c38777a /main.ha | |
parent | Add architecture stuff to the README (diff) | |
download | forge-6d8dcf7a7c0db67da322243d049ad8a4255f7f1c.tar.gz forge-6d8dcf7a7c0db67da322243d049ad8a4255f7f1c.tar.zst forge-6d8dcf7a7c0db67da322243d049ad8a4255f7f1c.zip |
Set reuseport and reuseaddr
Diffstat (limited to 'main.ha')
-rw-r--r-- | main.ha | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -6,9 +6,10 @@ use getopt; use htmpl; use log; use net; -use net::ip; -use net::http; use net::dial; +use net::http; +use net::ip; +use net::tcp; use os; use memio; use io; @@ -42,7 +43,7 @@ export fn main() void = { }; }; - const server = match (http::listen(ip_addr, port)) { + const server = match (http::listen(ip_addr, port, net::tcp::reuseport, net::tcp::reuseaddr)) { case let this: *http::server => yield this; case net::error => abort("failure while listening"); |