Communication between program running on Standalone VM and Browser based App

99 views Asked by At

If a communication mechanism has to be established between a stand-alone Dart VM and browser based application on the same machine, how can this be achieved in DART.

The dart:io library does not work in browser-based applications.

Hence, using SendPort/ReceivePort cannot be used.

1

There are 1 answers

0
Robert On BEST ANSWER

I think you could:

  • use WebSockets on the Browser side and
  • use a (Server)Socket on the stand-alone dart VM to listen for incoming websockets.

Regards, Robert

EDIT

A long time ago I wrote a nodejs server side implementation of a websocket-server - maybe this helps you do setup the server side if you decide to use websockets:

https://github.com/roberthartung/kit_websocket