Hi @李畋岷 ,
Based on the third line of the code you provided, it should get something like this: wss://<hostname>:<port>/wss
. Is that what you expected?
On the other hand, I'm not sure if you created a websocket server
for it, I created websocket server using NodeJS and did a simple test, and I found that it works correctly in Edge version 96.0.1054.43. If possible, could you provide more details, such as if there are any error messages in the console or provide complete code example to reproduce this issue?
Here is my test below:
const WebSocket = require('ws');
const WebSocketServer = WebSocket.Server;
const wss = new WebSocketServer({
port: 8080
});
----------
And result below:
You could also refer to this doc for more details about websocket server.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.