]> Cypherpunks repositories - gostls13.git/commit
net: implement (*syscall.RawConn).Read/Write on Windows
authorAman Gupta <aman@tmm1.net>
Tue, 7 Nov 2017 07:02:21 +0000 (23:02 -0800)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 14 Apr 2018 05:36:36 +0000 (05:36 +0000)
commitd2c7dec183f0da628abf16848e9e92987feebe32
tree43b2933f6cff8876c20a444775586d534b284ee4
parent11309ba0e651bbbec0ff9d7200bb51b56a5c0f49
net: implement (*syscall.RawConn).Read/Write on Windows

RawRead assumes the callback will perform either (a) a blocking read
and always return true, (b) a blocking read with a SO_RCVTIMEO set
returning false on WSAETIMEDOUT, or (c) a non-blocking read
returning false on WSAEWOULDBLOCK. In the latter two cases, it uses
a 0-byte overlapped read for notifications from the IOCP runtime
when the socket becomes readable before trying again.

RawWrite assumes the callback will perform blocking write and will
always return true, and makes no effort to tie into the runtime loop.

Change-Id: Ib10074e9d502c040294f41a260e561e84208652f
Reviewed-on: https://go-review.googlesource.com/76391
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
src/internal/poll/fd_windows.go
src/internal/syscall/windows/syscall_windows.go
src/net/rawconn.go
src/net/rawconn_test.go
src/net/rawconn_windows_test.go