You build it into your current emulator. Create a javascript manger on your client side, and then create the socket manager on your side. Fleck will handle the funnel of information and you parse it on both sides. Make sure you secure it so users can't hijack into someone elses socket, since it is a client side system.