mirror of
https://github.com/vlang/v.git
synced 2025-09-08 06:41:58 -04:00
picoev: add -d support_wsl1
(workaround #22493)
This commit is contained in:
parent
0cf3a445b7
commit
ab862c4285
@ -123,10 +123,13 @@ fn listen(config Config) !int {
|
||||
// epoll socket options
|
||||
net.socket_error(C.setsockopt(fd, C.SOL_SOCKET, C.SO_REUSEPORT, &flag, sizeof(int)))!
|
||||
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_QUICKACK, &flag, sizeof(int)))!
|
||||
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_DEFER_ACCEPT, &config.timeout_secs,
|
||||
sizeof(int)))!
|
||||
queue_len := max_queue
|
||||
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_FASTOPEN, &queue_len, sizeof(int)))!
|
||||
$if !support_wsl1 ? {
|
||||
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_DEFER_ACCEPT, &config.timeout_secs,
|
||||
sizeof(int)))!
|
||||
queue_len := max_queue
|
||||
net.socket_error(C.setsockopt(fd, C.IPPROTO_TCP, C.TCP_FASTOPEN, &queue_len,
|
||||
sizeof(int)))!
|
||||
}
|
||||
}
|
||||
|
||||
// addr settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user