]> Cypherpunks repositories - gostls13.git/commit
runtime,internal/poll: move websocket handling out of the runtime on Windows
authorqmuntal <quimmuntal@gmail.com>
Fri, 19 Jan 2024 13:14:17 +0000 (14:14 +0100)
committerQuim Muntal <quimmuntal@gmail.com>
Tue, 23 Jan 2024 15:36:19 +0000 (15:36 +0000)
commitd0dc93c8e1a5be4e0a44b7f8ecb0cb1417de50ce
tree1c6367b1b8d3d6e91475f2f9911ca52d79e8b46b
parent704401ffa06c60e059c9e6e4048045b4ff42530a
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>
src/internal/poll/fd_windows.go
src/internal/syscall/windows/syscall_windows.go
src/internal/syscall/windows/zsyscall_windows.go
src/runtime/netpoll_windows.go
src/runtime/os_windows.go