Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
imndx committed Feb 22, 2024
1 parent 2401e37 commit c7f2c8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wstool/css/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ var Vm = new Vue({
}, 3000);
},
autoWsConnect: function () {
if(this.address.startsWith('ws://') && location.href.startsWith('https://')){
alert('开启连接失败。仅当当前网页是 http 方式加载时,才能测试 ws 连接,请手动用 http 方式加载本页面')
return;
}
try {
if (this.connected === false){
localStorage.setItem('address', this.address)
Expand Down
1 change: 1 addition & 0 deletions wstool/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ <h5 class="card-title">服务器配置 状态: {{ instance.readyState | rStatus
</div>
<div class="wf-tip">
说明:
<div style="color: red">0. 测试ws(非 wss)连接时,请确保本网页是通过 http 方式加载,如果不是的话,需要手动调整为 http 方式加载</div>
<div>1. im-server-host 填节点域名</div>
<div>2. websocket(ws) 端口默认是 8083</div>
<div>3. secure websocket(wss) 端口默认是 8084</div>
Expand Down

0 comments on commit c7f2c8c

Please sign in to comment.