You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syscall package for Windows define a new type syscall.Handle and it is an equivalence to uintptr. The first argument of GetsockoptInt and SetsocketoptInt functions is syscall.Handle in Windows, not uintptr in Linux.
Unfortunately I don't really have any good way to test this package on Windows; in that particular case, however, it looks like GetsockoptInt is now implemented in the golang.org/x/sys/windows package that replaced syscall. While Windows and Unix are often very different, Windows adopted the Unix socket API, so getsockopt does indeed exist on windows.
I think we'd need to take all the calls to GetsockoptInt and SetsockoptInt and put them into build tag-controlled files that import unix or windows as appropriate. I'm probably unlikely to do that myself but I'm happy to take a PR.
When I build this project on Windows, this error appears:
Google says that GetsockoptInt is a very Unix thing and not compatible with Windows. Codes for GetsockoptInt in golang for Windows is like this:
The text was updated successfully, but these errors were encountered: