Welcome Guest, Not a member yet? Register   Sign In
how to implement Server-sent events with codeigniter ??
#2

[eluser]TheFuzzy0ne[/eluser]
It's certainly possible, but you'd be better of using a different protocol, like IRC or Jabber. HTTP (at the moment, anyway), doesn't allow you to PUSH requests from the server because there is no persistent connection to the server.

You can set up your server to allow a persistent connection, but it's probably easier to just set up polling, which would require Javascript. Then you send an AJAX request to the server every n seconds, and the server can let you know if anything's changed. It's up to you to implement your backend so that it keeps a record of when your controller method was last called, which can be queried easily. Just bear in mine that this will require Javascript to be enabled in your users' browsers.


Messages In This Thread
how to implement Server-sent events with codeigniter ?? - by El Forum - 05-27-2013, 11:27 AM
how to implement Server-sent events with codeigniter ?? - by El Forum - 05-28-2013, 09:16 AM
how to implement Server-sent events with codeigniter ?? - by El Forum - 05-29-2013, 07:26 AM
how to implement Server-sent events with codeigniter ?? - by El Forum - 05-29-2013, 07:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB