I made a small test using a websocket. I just put the code online on github.
It very simple, and might not be the best code, but you should be able to implement your own character.