Git Product home page Git Product logo

Comments (11)

liguobao avatar liguobao commented on July 30, 2024

可以的,不过要注意https证书的问题,这个就自行解决了。

from sekiro-open.

haonit avatar haonit commented on July 30, 2024

可以的,不过要注意https证书的问题,这个就自行解决了。

release的1.2版本,说是只配一个5620端口,我用wireshark抓了5620端口的包,返回400错误啊,你确定可以?

from sekiro-open.

liguobao avatar liguobao commented on July 30, 2024

是的。
请使用最简单的HTML + JS来测试。

<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>

from sekiro-open.

haonit avatar haonit commented on July 30, 2024

是的。
请使用最简单的HTML + JS来测试。

image
不好意思,我这边真不知道哪里有问题

from sekiro-open.

liguobao avatar liguobao commented on July 30, 2024

var client = new SekiroClient("ws://localhost:5620/register?group=ws-group-2&clientId=" + guid());

修改一下这里。

from sekiro-open.

liguobao avatar liguobao commented on July 30, 2024

文档请参考 https://sekiro.virjar.com/sekiro-doc

from sekiro-open.

haonit avatar haonit commented on July 30, 2024

文档请参考 https://sekiro.virjar.com/sekiro-doc

image
好吧,我是看了这里http的api都是business-demo,
我看例子里的websocket是new SekiroClient("wss://sekiro.virjar.com/business/register?group=ws-group-2&clientId=" + guid());
所以我想着demo的websocket就是new SekiroClient("wss://127.0.0.1/business-demo/register?group=ws-group-2&clientId=" + guid());了

from sekiro-open.

liguobao avatar liguobao commented on July 30, 2024

注册接口不太一样。

from sekiro-open.

haonit avatar haonit commented on July 30, 2024

可以的,不过要注意https证书的问题,这个就自行解决了。

还请问一下,怎么加证书呢?需要改代码么?

from sekiro-open.

liguobao avatar liguobao commented on July 30, 2024

Nginx + https证书这种,和sekiro无关的。

from sekiro-open.

virjar avatar virjar commented on July 30, 2024

我改下,businiess-demo我也加上,保持和文档同步

from sekiro-open.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.