This commit is contained in:
ge
2026-04-29 22:22:54 +03:00
parent 9972b3e18f
commit 57cf5edefd
3 changed files with 20 additions and 2 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
import netio
import netio.protocol
fn main() {
// This is only for examples_test.v
@@ -8,7 +9,8 @@ fn main() {
listen_addr := netio.SocketAddr.new_ipv4([..]u8[127, 0, 0, 1], 1088)
// Create server socket.
socket := netio.Socket.new(netio.af_inet, netio.sock_stream, 0)!
socket := netio.Socket.new(netio.af_inet, netio.sock_stream,
protocol.protocol_by_name('tcp')!.number)!
// Close server socket on exit.
defer {