uWebsockets c ++
h.onMessage([](WebSocket<SERVER> *ws, char *message, size_t length, OpCode opCode) {
printf("$");
char msg[1024] = "113.25|27.25|25.2";
message = msg;
length = strlen(msg);
ws->send(message, length, opCode);
//Sleep(1000);
});
我想主动将数据从服务器发送到客户端。 我该怎么办?