uNetworking / uWebSockets.js

μWebSockets for Node.js back-ends :metal:
Apache License 2.0
7.86k stars 569 forks source link

Server Side Event #709

Closed webigorkiev closed 2 years ago

webigorkiev commented 2 years ago

I am trying to implement Server Side Event back end. How do I handle the connection reset(close) event?

In node.js http package it is req.on('close', () => { }); How to do it in uWebSockets.js?

Thanks

webigorkiev commented 2 years ago

onAborted - works fine. It would probably be cool to have an example on Server Send Event

techvlad commented 2 years ago

@webigorkiev I created an example of Server-sent Events #711