dispatchrun / net

Go package implementing WASI socket extensions
Apache License 2.0
137 stars 7 forks source link

wasip1: use existing network address values #6

Closed achille-roussel closed 1 year ago

achille-roussel commented 1 year ago

This PR depends on https://go-review.googlesource.com/c/go/+/502375/1

With this change, we remove the wasip1.conn wrapper for net.Conn and instead operate on the net.Addr values returned by the network connections. This mechanism relies on documented behavior of the net package which says that the connection objects do not modify their address values and return the same value over multiple calls to their LocalAddr and RemoteAddr methods.

achille-roussel commented 1 year ago

It only needs the first two indeed 👍