Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: keep SocketConn or not? #11492
I'm having a hard time understanding its docs:
@mikioh, what does this enable users to do?
I intend to write a more complete comment on the CL but I have been preempted by other work.
As I understand it, SocketConn is FileConn but allows the use of arbitrary socket address types instead of just the few that FileConn knows about. It seems to me that the net package should just keep using (and providing) only FileConn but perhaps we can put a registration mechanism in package syscall to let clients register converters between sockaddrs and net.Addr for non-standard sockaddr types.
Thanks for the explanation, @rsc. Simply I wanted to allow us to mix features under the hood, various hardware-offloading stuff, new extensions for transport protocols and routing metrics for transport path selection, in existing network applications. For that purpose I needed to find out some way injecting unknown socket address and endpoint types in the standard library into runtime-integrated network poller.
If it does make sense and is possible, I'm happy to revert the current change and will take the approach in Go 1.6.