This commit is contained in:
ge
2026-05-01 23:03:05 +03:00
parent 04a644869e
commit ed674e41e1
10 changed files with 430 additions and 412 deletions
+12 -10
View File
@@ -1,15 +1,17 @@
import netio
// This program starts a server that listens for TCP connections on port 1081.
// The program listens on all addresses available in the operating system,
// including IPv4 and IPv6.
//
// Run the program and try connecting using the telnet utility:
//
// telnet 127.0.0.1 1081 # IPv4
// telnet ::1 1081 # IPv6
//
// This program fails if operation system does not support IPv6 or IPv6 is disabled.
/*
This program starts a server that listens for TCP connections on port 1081.
The program listens on all addresses available in the operating system,
including IPv4 and IPv6.
Run the program and try connecting using the telnet utility:
telnet 127.0.0.1 1081 # IPv4
telnet ::1 1081 # IPv6
This program fails if operation system does not support IPv6 or IPv6 is disabled.
*/
fn main() {
// We want to bind a server socket to the all available local addresses,