mirror of
https://github.com/vlang/v.git
synced 2025-08-03 17:57:59 -04:00
13 lines
195 B
V
13 lines
195 B
V
import net
|
|
|
|
fn test_bind() {
|
|
$if !network ? {
|
|
return
|
|
}
|
|
eprintln(@LOCATION)
|
|
mut conn := net.dial_tcp_with_bind('vlang.io:80', '0.0.0.0:0')!
|
|
dump(conn)
|
|
conn.close()!
|
|
eprintln(@LOCATION)
|
|
}
|