aboutsummaryrefslogtreecommitdiff
path: root/src/internal/syscall/windows/syscall_windows.go
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2024-01-19 14:14:17 +0100
committerQuim Muntal <quimmuntal@gmail.com>2024-01-23 15:36:19 +0000
commitd0dc93c8e1a5be4e0a44b7f8ecb0cb1417de50ce (patch)
tree1c6367b1b8d3d6e91475f2f9911ca52d79e8b46b /src/internal/syscall/windows/syscall_windows.go
parent704401ffa06c60e059c9e6e4048045b4ff42530a (diff)
downloadgo-d0dc93c8e1a5be4e0a44b7f8ecb0cb1417de50ce.tar.xz
runtime,internal/poll: move websocket handling out of the runtime on Windows
On Windows, the netpoll is currently coupled with the websocket usage in the internal/poll package. This CL moves the websocket handling out of the runtime and puts it into the internal/poll package, which already contains most of the async I/O logic for websockets. This is a good refactor per se, as the Go runtime shouldn't know about websockets. In addition, it will make it easier (in a future CL) to only load ws2_32.dll when the Go program actually uses websockets. Change-Id: Ic820872cf9bdbbf092505ed7f7504edb6687735e Reviewed-on: https://go-review.googlesource.com/c/go/+/556936 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/internal/syscall/windows/syscall_windows.go')
-rw-r--r--src/internal/syscall/windows/syscall_windows.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/internal/syscall/windows/syscall_windows.go b/src/internal/syscall/windows/syscall_windows.go
index d10e30cb68..a02c96c8f0 100644
--- a/src/internal/syscall/windows/syscall_windows.go
+++ b/src/internal/syscall/windows/syscall_windows.go
@@ -235,6 +235,7 @@ type WSAMsg struct {
}
//sys WSASocket(af int32, typ int32, protocol int32, protinfo *syscall.WSAProtocolInfo, group uint32, flags uint32) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = ws2_32.WSASocketW
+//sys WSAGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
func loadWSASendRecvMsg() error {
sendRecvMsgFunc.once.Do(func() {