Run `crystal play` a from seperate host

I am currently trying to run crystal play inside of a VM (running ArchLinux) that will allow outside host to interact with it.

This is the current command and arguments I’m using (which seems to work)

crystal play --binding

and my host system is able to connect through the web browser. When I try to run any code it ends up giving me this error

I have a feeling it could have to do with the way my internet is setup on the VM (using a binding adapter for the device in virtual box) but I wanna verify that I am using the command correctly and it may not be something out of my control.

Thanks in advance.

The agent, that sends values to the playground server from the input program, connects to localhost. Allways.

For know you can bind to so it would work from the guest and from the host.

In the future the agent might connect using other means than http, so this should no happen.