We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
答案:
worker 主线程:
1.通过 worker = new Worker( url ) 加载一个JS文件来创建一个worker,同时返回一个worker实例。 2.通过worker.postMessage( data ) 方法来向worker发送数据。 3.绑定worker.onmessage方法来接收worker发送过来的数据。 4.可以使用 worker.terminate() 来终止一个worker的执行。
WebSocket 是 Web 应用程序的传输协议,它提供了双向的,按序到达的数据流。他是一个 Html5 协议,WebSocket 的连接是持久的,他通过在客户端和服务器之间保持双工连接,服务器的更新可以被及时推送给客户端,而不需要客户端以一定时间间隔去轮询。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
答案:
worker 主线程:
WebSocket 是 Web 应用程序的传输协议,它提供了双向的,按序到达的数据流。他是一个 Html5 协议,WebSocket 的连接是持久的,他通过在客户端和服务器之间保持双工连接,服务器的更新可以被及时推送给客户端,而不需要客户端以一定时间间隔去轮询。
The text was updated successfully, but these errors were encountered: