Yeah. That's how I have used it. But it would be great if phantomjs can be launched as a daemon and then you pass a script for it to process. Or launch it with a script which runs forever and accepts input (phantomjs has an inbuilt web server).
I think it ay be possible but wanted to know for sure.
Yes, it uses xmlrpc (node-xmlrpc) for communication between RobotFramework and Node, and websockets (socket.io) for communication between Node and PhantomJS (which didn't bundle http-server when I started).
I'm sorry to not have a separate websockets-example, but there's really nothing special in using websockets with phantom.