#1 Yesterday 17:15:52

rcla
Member
Registered: 2025-12-13
Posts: 4

TWebSocketProcess and SendFrameJson

TWebSocketProtocolChat has the SendFrameJson function.

Is it possible to add this function to TWebSocketProcess?

Something like:

function TWebSocketProcess.SendFrameJson(const Json: RawUtf8): boolean;
var
  frame: TWebSocketFrame;
begin
  frame.opcode := focText;
  frame.content := [];
  frame.tix := 0;
  FastSetRawByteString(frame.payload, pointer(Json), length(Json)); // temp copy
  result := SendFrame(frame)
end;

Offline

Board footer

Powered by FluxBB