Simple WebSockets test code based on tutorials and my own mucking around