codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
380 stars 77 forks source link

Implement SocketPlugin #40

Open codefrau opened 9 years ago

codefrau commented 9 years ago

So far, there is no networking support (except via the JSBridge). It would be awesome if socket connections could be opened, but it's not quite clear how this could work. WebSockets are a possibility but are hampered by the browser's security restriction. Possibly a proxy server is needed.

ccrraaiigg commented 9 years ago

Yes, a proxy server is needed. I'm writing WebSockets support for Squeak on all host platforms, including SqueakJS. It supports transparent operation of the Flow networking API.

codefrau commented 8 years ago

As of 94c003a3fbf28aba91f20631fe75d843ee169960 we have a client-side only SocketPlugin using a public CORS proxy. It only supports http/https requests. So I think a WebSocket-based client+server solution is still needed, to enable non-http connections. Do we want to ship two different SocketPlugins? Or merge them into one?

ccrraaiigg commented 8 years ago

I think we should merge them into one. The networking support I mentioned is now part of another project that includes remote messaging, screen-sharing, and a new way of installing native Squeak. While those special cases have priority over transparent generalized socket use (similar to the image-updating case), I estimate having something separable in August.

ErikOnBike commented 5 years ago

I have updated the SocketPlugin with WebSocket support. It is working in my current setup (on NodeJS and within browser) with Cuis. Some more testing is needed with different images as well as some extra guards need to be build in. I do have a few questions though:

@ccrraaiigg maybe this is useful for Caffeine as well.

codefrau commented 5 years ago

Awesome! I'm really busy atm, so can't review in detail, sorry. But as to your questions:

ErikOnBike commented 4 years ago

I think this issue can be closed. If getting rid of XMLHttpRequest is relevant, maybe we should create separate issue for it. (Would clean things up in SocketPlugin ;-).