upd12
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import netio
|
||||
import netio.protocol
|
||||
|
||||
fn main() {
|
||||
// This is only for examples_test.v
|
||||
@@ -9,8 +8,10 @@ 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,
|
||||
protocol.protocol_by_name('tcp')!.number)!
|
||||
socket := netio.Socket.new(netio.af_inet, netio.sock_stream, 0) or {
|
||||
eprintln('SOCKET: ${err}')
|
||||
exit(1)
|
||||
}
|
||||
|
||||
// Close server socket on exit.
|
||||
defer {
|
||||
|
||||
Reference in New Issue
Block a user