This change makes it possible to know the pair of local and remote addresses when accepting connections from a pre-open file descriptor, in cases where SockLocalAddress was never called by the guest application. It also results in having all the information needed to construct a net.Conn without having to make an extra call.
I also added a second commit to rename SockPeerAddress to SockRemoteAddress, the correspondence between Local/Remote is more coherent than Local/Peer, which I think we had derived from the WasmEdge ABI. It also reuses the naming of Go's net package, making API more familiar to developers.
This change makes it possible to know the pair of local and remote addresses when accepting connections from a pre-open file descriptor, in cases where SockLocalAddress was never called by the guest application. It also results in having all the information needed to construct a
net.Conn
without having to make an extra call.I also added a second commit to rename
SockPeerAddress
toSockRemoteAddress
, the correspondence between Local/Remote is more coherent than Local/Peer, which I think we had derived from the WasmEdge ABI. It also reuses the naming of Go'snet
package, making API more familiar to developers.