Stream: git-wasmtime

Topic: wasmtime / issue #4004 Wasmtime running .net web applicat...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2022 at 16:21):

Uchiha-Peng opened issue #4004.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2022 at 16:21):

peterhuene edited issue #4004:

<img width="650" alt="image" src="https://user-images.githubusercontent.com/20633089/162136463-f08aea81-06fd-4de6-9f0d-1c6e5d24d437.png">

When I use the wasmtime xxx.wasm command to run the .NET web application and specify the program listening port through --tcplisten localhost:8000, the console always prints :

info: Microsoft.Hosting.Lifetime
       Now listening on: http://localhost:5000

But the real port of the web application is not 5000

The command I use is as follows:

wasmtime webapp.wasm --tcplisten localhost:8000
info: Microsoft.Hosting.Lifetime
      Now listening on: http://localhost:5000

view this post on Zulip Wasmtime GitHub notifications bot (Apr 07 2022 at 16:51):

bjorn3 commented on issue #4004:

I suspect dotnet simply reports localhost:8000 as default for the lack of a wasi api to retrieve the actual address and port it listens on. --tcplisten gives the wasi program a socket on which it can call sock_accept. Nothing more, nothing less AFAIK.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 08 2022 at 00:07):

Uchiha-Peng commented on issue #4004:

@peterhuene Thanks for your patient reply.

view this post on Zulip Wasmtime GitHub notifications bot (May 18 2022 at 09:12):

haraldh commented on issue #4004:

The wasm application cannot get any socket stats for pre-opened sockets, as sockaddr is not defined in WASI, so it always reports 0.0.0.0 port 0. The string you are seeing must be some fallback.


Last updated: Nov 22 2024 at 16:03 UTC