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

net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904)

This commit is contained in:
Emily Hudson
2021-06-13 21:53:38 +01:00
committed by GitHub
parent fa9fa77a5f
commit 535dcac8fa
52 changed files with 1277 additions and 524 deletions

View File

@ -9,7 +9,7 @@ const (
fn C.SUN_LEN(ptr &C.sockaddr_un) int
fn C.strncpy(charptr, charptr, int)
fn C.strncpy(&char, &char, int)
// Shutdown shutsdown a socket and closes it
fn shutdown(handle int) ? {
@ -20,8 +20,6 @@ fn shutdown(handle int) ? {
C.shutdown(handle, C.SHUT_RDWR)
net.socket_error(C.close(handle)) ?
}
return none
}
// Select waits for an io operation (specified by parameter `test`) to be available
@ -72,7 +70,7 @@ fn wait_for_common(handle int, deadline time.Time, timeout time.Duration, test S
}
ready := @select(handle, test, timeout) ?
if ready {
return none
return
}
return net.err_timed_out
}
@ -87,7 +85,7 @@ fn wait_for_common(handle int, deadline time.Time, timeout time.Duration, test S
ready := @select(handle, test, d_timeout) ?
if ready {
return none
return
}
return net.err_timed_out
}