Updated to use the latest Network.WebSockets API