joaodasilva opened this issue · comments
Window.js should implement the fetch API:
This enables programs to make HTTP and HTTPS requests.
Window.js should support a WebSockets client as well.
A separate issue is to support networking and TCP/UDP sockets in general, also for server sockets.
Window.js already includes libuv but it's scoped to supporting subprocesses, and there's a uv_loop_t per subprocess. The first part of this work would be to refactor that and have a single uv_loop_t to be used for all file, networking and IPC for the current process. It should be completely reset on reloads.
Another initial decision to make is which library to use to have an HTTP client, as libuv only gives sockets support. Some candidates to look into would be libcurl and libwebsockets, and maybe cronet.