Skip to content

Commit

Permalink
vlib: net.tcp_listener support only ip and ip6
Browse files Browse the repository at this point in the history
  • Loading branch information
hholst80 committed Jan 1, 2024
1 parent e5cf336 commit f1ffce5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vlib/net/tcp.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ pub:
}

pub fn listen_tcp(family AddrFamily, saddr string, options ListenOptions) !&TcpListener {
if family != .ip && family != .ip6 {
return error('listen_tcp only supports ip and ip6')
}
mut s := new_tcp_socket(family) or { return error('${err.msg()}; could not create new socket') }
s.set_dualstack(options.dualstack) or {}

Expand Down

0 comments on commit f1ffce5

Please sign in to comment.