Chrome - Disabling Web Sockets or Closing a Web Socket Connection?

ぐ巨炮叔叔 提交于 2019-12-03 01:04:27

No, there is no way to disable or close a connection from the Network panel. Source: DevTools Engineer.

If you have a reference to the WS connection, though, you can close it via the Console using its JS API.

You can close idle and flush your inactive socket pools in the Net Internals page in Chrome. However, this unfortunately only closes your active sockets by the looks of it.

chrome://net-internals/#sockets

You would have to use the WebSockets API and call close() on a reference to an existing socket to close it explicitly. Otherwise, killing the process with the active socket is all I can think of.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!