Closed helsaawy closed 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
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
Ill split this into a functionality PR and a tests PR
Added tests for Hyper-V sockets, including
CloseRead
andCloseWrite
, and that addresses are set appropriately.Bug fixes:
AcceptEx
(andConnectEx
), so thatGetSockName
,GetPeerName
, andShutdown
(forCloseRead
andCloseWrite
) now function properly.socketError
used to checkbind
's return value was incorrect, it should beuintptr(^uint32(0))
, not^uintptr(0)
Added resources to support testing:
Dial()
andDialContext()
(along with a correspondingHvsockDialer
struct) to dial a specific Hyper-V socket at an address.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 toBind
,ConnectEx
andGetSockName
, bypassingsyscall/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