What is the easiest way to establish communication between two Dart VMs?

Issue

What is the recommended way to establish communication between two Dart VMs? Isolates, as recommended here?

Solution

Thanks for the question!

If the two Dart VMs are running on the server, I would consider using TCP sockets.

You can start a ServerSocket to listen for incoming requests. You can use a Socket to connect to the other server.

Isolates haven’t been extended to cross-VM communication yet. That may happen in the future, but it’s not on our near-term roadmap.

Answered By – Seth Ladd

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.