microsoft / go-winio

Win32 IO-related utilities for Go
MIT License
952 stars 182 forks source link

Added HV Socket tests #235

Closed helsaawy closed 2 years ago

helsaawy commented 2 years ago

Added tests for Hyper-V sockets, including CloseRead and CloseWrite, and that addresses are set appropriately.

Bug fixes:

Added resources to support testing:

Additionally, added functionality to register an application (service GUID and name) in the registry to enable Hyper-V sockets using that service GUID

Created a sockets package, currently only with syscalls to Bind, ConnectEx and GetSockName, bypassing syscall/windows restrictions that they only be used on socket address types defined by the package.

Upgraded to go v1.17 to use unsafe.Slice().

Signed-off-by: Hamza El-Saawy hamzaelsaawy@microsoft.com

dcantah commented 2 years ago

This does a heck of a lot more than the title leads on 😆. Preferably this should be split across multiple commits (possibly even multiple PRs). I don't think we should bump to 1.17 in this PR at the very least, we can shoot to get this in https://github.com/microsoft/go-winio/pull/230, but I think the more important fact is the dial and registry work here

helsaawy commented 2 years ago

I don't think we should bump to 1.17 in this PR at the very least, we can shoot to get this in #230, but I think the more important fact is the dial and registry work here

I think my implementation of dial needs 1.17 for unsafe.Slice, so I'll wait for #230 to be merged

helsaawy commented 2 years ago

Ill split this into a functionality PR and a tests PR