JavaScript/websocket:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
Kangkk​(留言 | 贡献)
第11行: 第11行:
=== jmeter ===
=== jmeter ===
==== error ====
==== error ====
* <pre>
* <syntaxhighlight lang="javascript">
You should save your test plan before running it.
You should save your test plan before running it.
If you are using supporting data files (ie, for CSV Data Set or_ _StringFromFile),
If you are using supporting data files (ie, for CSV Data Set or_ _StringFromFile),
then it is particularly important to first save your test script.
then it is particularly important to first save your test script.
Do you want to save your test plan first?</pre>
Do you want to save your test plan first?</syntaxhighlight>


=== postman ===
=== postman ===

2022年1月15日 (六) 08:00的版本

引言

WebSocket 是区别于 HTTP/HTTPS 的一种协议,主要应用于推送服务器。

握手

websocket

MozWebSocket

mozwebsocket 是 生成 websocket(html5长连bai接的一种方式du) 对象的基类,moz 这三个zhi字母应该是mozilla基金会的简称,而mozilla是firefox(火狐)浏览器的东家(我的猜测);所以mozwebsocket 应该是在火狐浏览器中创建 websocket对象的基类。 已经被弃用。

调试

jmeter

error

  • You should save your test plan before running it.
    If you are using supporting data files (ie, for CSV Data Set or_ _StringFromFile),
    then it is particularly important to first save your test script.
    Do you want to save your test plan first?
    

postman

error

  • WebSocket is closed before the connection is established
    如果前端代码做了 websocket 断开重连,如果连接超时就会关闭连接,我这里是因为每次连接之前都将之前的连接 null
  • failed: Unknown reason
    未知原因错误,我这里的原因是超出连接池限制