Hacker News new | past | comments | ask | show | jobs | submit login

No. WebSockets are a specific protocol tunneled over HTTP, not raw sockets, and WASM doesn't expose any functionality which wasn't already available to JS.



Webrtc?


You could make something similar to FTP with that, but it wouldn't be interoperable. Web browsers just don't expose a generic socket api where you can specify ports, bind(), listen(), accept(), connect(), and so on. So you can't make generic socket clients or servers. XHR, websockets, webrtc, and so on might be able to connect to a specific port, but they send things that would cause errors, and can't send/receive arbitrarily crafted sequences of data.




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

Search: