1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

net: add a net.dial_tcp_with_bind/2 function (#15055) (#15056)

This commit is contained in:
shove
2022-07-15 17:38:17 +08:00
committed by GitHub
parent 4f997feee7
commit b4ed5d5f20
2 changed files with 55 additions and 0 deletions

View File

@@ -100,3 +100,11 @@ fn test_tcp_unix() {
fn testsuite_end() {
eprintln('\ndone')
}
fn test_bind() {
$if !network ? {
return
}
conn := net.dial_tcp_with_bind('vlang.io:80', '127.0.0.1:0')
conn.close()
}