This PR adds wasip1.ListenPacket which is the equivalent of net.ListenPacket, and an implementation of net.PacketConn using the sock_send_to and sock_recv_from host functions of wasmedge.
The tests validate the behavior of IP and Unix Datagram sockets, and addresses a couple of bugs that I hit along the way.
This PR adds
wasip1.ListenPacket
which is the equivalent ofnet.ListenPacket
, and an implementation ofnet.PacketConn
using thesock_send_to
andsock_recv_from
host functions of wasmedge.The tests validate the behavior of IP and Unix Datagram sockets, and addresses a couple of bugs that I hit along the way.
This will be useful to support https://go-review.googlesource.com/c/go/+/500579/13; I also intend to add an example showcasing end-to-end DNS with
net.Resolver
and https://github.com/miekg/dns.