PeerConnection, clearly, would be very hard. For NetConnection I was just thinking about basic REST calls. Almost all my AS3 game code starts with long polling to APIs and upgrades to a Socket.
The trouble with ExternalInterface (if I even remember) is that it makes you define custom methods on the Javascript side to link to active AS3 methods... I guess what I mean is could there be a common wrapper that sets up a web worker which can open either WebSockets or `fetch` / XMLHttpRequests arbitrarily and stream messages back and forth to a Ruffle class that implements all of the normal AS3 socket / NetConnection functions? Like, browser middleware in a worker to do all the outbound connections? I don't mean opening inbound sockets -- that was never really a feature of AS3 except through RTMP, and that's not what I'm referring to. I mean connecting up to server sockets. Maybe I'm not making sense or I'm too far out of this and need to just start tinkering ;)
The trouble with ExternalInterface (if I even remember) is that it makes you define custom methods on the Javascript side to link to active AS3 methods... I guess what I mean is could there be a common wrapper that sets up a web worker which can open either WebSockets or `fetch` / XMLHttpRequests arbitrarily and stream messages back and forth to a Ruffle class that implements all of the normal AS3 socket / NetConnection functions? Like, browser middleware in a worker to do all the outbound connections? I don't mean opening inbound sockets -- that was never really a feature of AS3 except through RTMP, and that's not what I'm referring to. I mean connecting up to server sockets. Maybe I'm not making sense or I'm too far out of this and need to just start tinkering ;)