-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added HV Socket known IDs, Dial, bug fixes #239
Conversation
This seems like a change that should be split across multiple PRs. For instance can we add I'd also like to understand better what the motivation is for these changes. What can a user of go-winio not do without these changes? |
Without the Those three ( I could add That said, I can split this into |
df6977a
to
144d754
Compare
Added: * Well-know Hyper-V VMIDs for parents, children, and loopback. * VSock interop service GUID. * `Dial()` and `DialContext()` to dial a specific Hyper-V socket at a known address (along with a corresponding `HvsockDialer` struct. Bug fixes: * Dial (and Listen) now properly initialize and set properties of their sockets after ConnectEx (and AcceptEx). * The `socketError` used by `bind` was incorrect, it should be `int32(-1)`, not `uintptr(^0)` * Return errors for `(*HvsockConn) SetDeadline` Created a `sockets` package, currently only with syscalls to `Bind`, `ConnectEx` and `GetSockName`, bypassing `syscall/windows` restrictions on the types that can do so. Signed-off-by: Hamza El-Saawy <[email protected]>
* comments and todos statements * spelling * removed dead code * changed names to be more conventional * unexported socket code * made `(*HvsockDialer) Dial` take `Context`, removed `DialContext` * added default `Dial` function * rebased onto main * cleaned up `Dial(` retry loop Signed-off-by: Hamza El-Saawy <[email protected]>
0997ca6
to
a615ab2
Compare
Signed-off-by: Hamza El-Saawy <[email protected]>
Added:
Dial()
andDialContext()
to dial a specific Hyper-V socket at a known address (along with a correspondingHvsockDialer
struct.Bug fixes:
socketError
used bybind
was incorrect, it should beint32(-1)
, notuintptr(^0)
Created a
sockets
package, currently only with syscalls toBind
,ConnectEx
andGetSockName
, bypassingsyscall/windows
restrictions on the types that cane be usedSigned-off-by: Hamza El-Saawy [email protected]