U
U
Urukhayy2017-07-24 20:51:32
JavaScript
Urukhayy, 2017-07-24 20:51:32

MEAN: Is it possible to keep an HTTP socket open for the duration of a session?

Some Angular component contains a table that can be updated by users at the same time. Is it possible to use a long open socket in Express for this purpose? Angular returns an Observable from HTTP.get . If Express sends res.write but does not close the res.end connection , can the application work this way? And will the callback in .subscribe of the Observable be called if Express sends res.write ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2017-07-25
@bingo347

IMHO, but web-socket is better for this task.
For ease of implementation, you can use https://www.npmjs.com/package/ws-api

V
Vladimir, 2017-07-25
@Casufi

https://github.com/y-js/yjs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question