Node.js var ws = require("ws"); var socket = new ws("ws://127.0.0.1:8001); var socket.on("open", function () { if (socket.readyState == 1) { var msg = {}; msg.status = 'ok'; socket.send(JSON.stringify(msg)); } }); var socket.on(&q
代码: using System; using System.Net.WebSockets; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Demo { class Program { async static Task Main(string[] args) { var client = new ClientWebSocket(); client.ConnectAsync(n