Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can anyone confirm if this can do proper TCP sockets? Not Websockets, but bonafide actual sockets?

That will open up a lot of use cases (at least for me)

It seems to say it can run any wasix, so yes? But GitHub page says no networking, so no?



One way to approach this would be to interpose all calls to the TCP interfaces (pretty straightforward with Wasm Components), and tunnel it using Websockets (or whatever) to a server that can make the actual TCP connections on your behalf. So the application running in Wasm doesn't know any different, at least.

I guess that's not quite what you wanted, but browsers don't allow making arbitrary direct TCP connections, so in general I don't think there _is_ a way to do what you wanted.


In the browser not yet, but support for TCP is on the roadmap! Feel free to email me at syrus@wasmer.io so I can keep you in the loop for the first trials :)


How could you add this if the browsers don't support it outright? Unless you mean faking it over web sockets to allow compiled applications to just think they're using TCP (in which case you still need a relay server)?


Use cases like what?


Applications that need to make direct TCP/UDP connections to things, but which you want to run in the browser and don't want to rely on a centralised websockets proxy or other hacks.

Endless use-cases for this. Servers, games, collaboration tools, clients for non-HTTP protocols (email, gopher, Gemini etc), file sharing. You name it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: