Note that there are some explanatory texts on larger screens.

plurals
  1. POPushing data from the server to browser via http
    primarykey
    data
    text
    <p>In general chat application, client's browser always poll to server to check for new messages.</p> <pre><code>// the function to check new messages in server function check(){ // but this question is less about jQuery. $.ajax({ type: "POST", url: "check.aspx", data: "someparam=123", success: function(msg){ // process msg here // CHECK IT AGAIN, but sometimes we need to make delay here check(); } }); } </code></pre> <p>Then I read <a href="http://blogs.msdn.com/drnick/archive/2006/10/20/keeping-connections-open-in-iis.aspx" rel="nofollow noreferrer">Nicholas Allen's blog about Keeping Connections Open in IIS</a>. </p> <p>It makes me think if it is possible to push data from my server to client's browser by transfer chunked HTTP (it means like streaming, right?) and <b>keep the connection open</b>. </p> <p>while keeping the connection open, in server, I have idea to keep something run to check new messages. something like this, maybe</p> <pre><code>while(connectionStillOpen) { // any new message? if( AnyMessage() ) { // send chunked data, can I? SendMessageToBrowser(); // may be we need to make delay here Sleep(forSomeTime); } } </code></pre> <p>that's a raw idea.</p> <p>My Chat App created in ASP.net. With my less understanding of WCF and advanced IIS streaming module, I need your advice about to implement this idea.</p> <p>yea, <b>Impossible</b> is probably the answer. But I need to know why if its still impossible.</p> <p><strong><em>UPDATE (3 years later):</em></strong></p> <p>This is exactly what I was looking for: <a href="http://weblogs.asp.net/davidfowler/archive/2012/11/11/microsoft-asp-net-signalr.aspx" rel="nofollow noreferrer">Microsoft ASP.NET SignalR</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload