Last post May 03, 2014 07:06 PM by VirtualLife
May 01, 2014 01:28 PM|mou_inn|LINK
i like to know how WebSocket ,Server Sent Events,Forever Frame,long polling etc work to establish connection between server & client.
1) what does it mean Server Sent Events and how this works to establish connection between server & client.
2) what does it mean Forever Frame and how this works to establish connection between server & client.
3) what does it mean long polling and how this works to establish connection between server & client.
i read all about transport mechanish from this url
but from the above url things were not clear to me because they have not written in detail. so looking for in-depth knowledge about various type of SignalR transport mechanism & how they establish connection. thanks
May 03, 2014 07:06 PM|VirtualLife|LINK
1. Unless I am missing you question, those are 2 separate concepts. Server sent event means the server sends an event/message to the client. The connection is done through a socket. Sockets are an old tech that are just now making it to the web. To think
about it another way. A socket connection is made from the client to the server. That socket allows the server to, in essence, keep that connection and send information to the client when needed. Vs the stateless environment the web normally has where the
client has to request info every time.
2. Honestly don't fully understand Forever Frame either, but it's just another way to keep that connection alive that I described above and below for older browsers.
3. Not all browsers support sockets, when the browser doesn't support sockets, ie a constant connection like I described in #1, it reverts back to polling. Which means at a specific interval, the browser polls the server to see if there is new information
that needs to be sent to the client. Think of hitting refresh over and over.
To put it all in another way. The client, be it IE Chrome ect hasn't been able to create a constant connection in the past. So the only way to get new data to the client in the past was to have client interaction, clicking a button, refreshing the page ect.
Sockets allow there to be a sort of constant connection (via sockets) so that the server can send data to the browser without it being directly requested. SignalR has many ways to implement that ability even if sockets are not available on that browser version.
Ie polling the server regularly to see if there is new data. Lastly, there are a few ways signalR does this, but for the most part, it's not something to worry about. It takes care of the hard work and all you have to do is follow it's implementation and it