-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
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
自己部署的demo版本,可以测试websocket么? #23
Comments
可以的,不过要注意https证书的问题,这个就自行解决了。 |
release的1.2版本,说是只配一个5620端口,我用wireshark抓了5620端口的包,返回400错误啊,你确定可以? |
是的。 <html>
<script src="https://sekiro.virjar.com/sekiro-doc/assets/sekiro_web_client.js"></script>
<script>
function guid() {
function S4() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
}
return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4());
}
var client = new SekiroClient("ws://localhost:5620/register?group=ws-group-2&clientId=" + guid());
client.registerAction("clientTime", function (request, resolve, reject) {
resolve("SekiroTest:" + new Date());
});
client.registerAction("executeJs", function (request, resolve, reject) {
var code = request['code'];
if (!code) {
reject("need param:{code}");
return;
}
code = "return " + code;
console.log("executeJs: " + code);
try {
var result = new Function(code)();
resolve(result);
} catch (e) {
reject("error: " + e);
}
});
</script>
</html> |
var client = new SekiroClient("ws://localhost:5620/register?group=ws-group-2&clientId=" + guid()); 修改一下这里。 |
注册接口不太一样。 |
还请问一下,怎么加证书呢?需要改代码么? |
Nginx + https证书这种,和sekiro无关的。 |
我改下,businiess-demo我也加上,保持和文档同步 |
virjar
added a commit
that referenced
this issue
Jul 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: