-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed as not planned
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.OS-Windows
Milestone
Description
Currently windows.Accept (like syscall.Accept for GOOS=windows) contains a stub function which does nothing.
Looks like this function was introduced to mimic unix.Sockaddr.Accept method but it's just a useless stub.
I propose to fix its signature and re-implement it as winsock's accept function.
In the end it will look something like this:
package windows
func Accept(fd windows.Handle, sockaddr, sockaddrLen uintptr)Winsock accept function signature (see MSDN)
SOCKET WSAAPI accept(
[in] SOCKET s,
[out] sockaddr *addr,
[in, out] int *addrlen
);Instead of passing sockaddr raw pointer and it's size it's possible to also use Sockaddr interface and the same approach like in windows.Bind but it will limit method's potential use cases (it can't be used for custom sockets). See #54209.
Metadata
Metadata
Assignees
Labels
NeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.OS-Windows