当先锋百科网

首页 1 2 3 4 5 6 7
def WS_listen_VideoEncoder():
    with connect("ws://localhost:27243") as websocket:
        websocket.send("{\"cmd\":\"register\",\"modulename\":\"VideoEncoder\"}\0")#register
        while True:
            message = websocket.recv()
            print(f"Received: {message}")

 websocket.send("{\"cmd\":\"register\",\"modulename\":\"VideoEncoder\"}\0")#register

这个数据是根据dbg文件中过来的,register

function navigetTo(port) {
            var pre = document.getElementById("myFrame");
            pre.src = "http://" + pageHost + ":" + port + "/getDebug";
        }
        function registerModule() {
            websocket.send("{\"cmd\":\"register\",\"modulename\":\"WatchDog\"}\0");
        }