Updated the code to use the latest version of web-sockets module.