Skip to content

wasmedge: sending UDP datagrams fails with Invalid argument error#34

Description

@marten-seemann

Hi guys, author of quic-go here 馃憢

I'm trying to compile a simple quic-go server and client to WASM, and I'm running into the following problem: sending UDP datagrams fails with an Invalid argument error.

I managed to distill it down to this simple example:

func main() {
	conn, err := wasip1.ListenPacket("udp", "127.0.0.1:6121")
	if err != nil {
		log.Fatalf("failed to listen: %v", err)
	}
	if _, err := conn.WriteTo([]byte("foobar"), &net.UDPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 1234}); err != nil {
		log.Fatalf("failed to write: %v", err)
	}
}

The above code works when using wasirun, but it fails with wasmedge.

Apologies if I'm missing something obvious, or if I opened the issue in the wrong repo. I'm pretty new to WASM.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions