[Pas2js] pas2js and server sent events
Luca Olivetti
luca at ventoso.org
Fri Aug 26 13:25:52 CEST 2022
El 26/8/22 a les 11:25, Mattias Gaertner ha escrit:
> On Fri, 26 Aug 2022 07:39:40 +0000 (UTC)
> Luca Olivetti <luca at ventoso.org> wrote:
>
>> Hello,
>>
>> I see that pas2js has support for websockets, but I cannot find if it
>> also supports server sent events.
>
> A websocket is bidirectional.
Yes, I know, but I'm lazy ;-) and if I can reuse the server class I
already implemented for sse I would be happy. Though maybe it wouldn't
be too much work
>
> WebSocket:=TJSWebSocket.new(URL);
> WebSocket.onmessage:=@OnWebSocketMessage;
> WebSocket.binaryType := 'arraybuffer';
Is this on the client or on the server? I couldn't find a freepascal
TJSWebSocket class on duckduckgo. I could find
https://github.com/Warfley/LazWebsockets but the class is called
TWebSocketServer.
Bye
--
Luca
More information about the Pas2js
mailing list