golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.11k stars 17.68k forks source link

net: support Linux vsock sockets #69769

Open waldiTM opened 1 month ago

waldiTM commented 1 month ago

Proposal Details

There exists basic support for AF_VSOCK sockets implemented in #19434.

Could support for such sockets please be added to the net module? For example net.FileListener can operate on TCP and UNIX sockets, but fails on vsock sockets.

ianlancetaylor commented 1 month ago

What API would need to be added to the net package? Thanks.

waldiTM commented 1 month ago

Sorry, I can't answer this. I don't know enough about how this should work.

I see separate implementations of sockaddr structs in syscall and x/sys/unix. So I assume right now, it would need the ones from syscall?

This means:

Problem I see: vsock is linux specific, the net package code is unix specific.

ianlancetaylor commented 1 month ago

Thanks. The way the proposal process is intended to work is that people work out the details of how the libraries should change and open a proposal for that. It doesn't work to ask us to figure things out--we don't know what you need. I'm going to take this out of the proposal process. Perhaps interested parties can work out the API changes, and then we can open a proposal for that.