Bookmark Topic Watch Topic
  • New Topic

Server sent events using Html5 EventSource & Spring SseEmitter

 
shivang sarawagi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Report post to moderator
I have implemented a very basic server sent http streaming in my app

Client side code



Server side



The connection is established. But on the UI why does the browser poll for the server every second. The alert is visible on the UI every second.



How does it make different from polling? I saw the same thing happening with the twitter streaming REST API the browser polls the server every second.

 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question in multiple forums. I'll lock this thread. Continue any further discussion in the other thread http://www.coderanch.com/t/658238/Spring/Server-events-Html-EventSource-Spring
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!