long-polling

Recommended alternative to webkit for server-sent events on iOS [closed]

蹲街弑〆低调 提交于 2019-12-06 06:22:24
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I would like to receive Server-Sent Events in my native iOS app however am not using webkit/Safari. From what I've found, NSURLConnection is poor fit as it chunks response . I've also looked at ZTWebSocket library (obviously nice, but I'm seeking SSE, not web sockets). Would CocoaAsyncSocket be appropriate? Or

What is a safe amount of time that I can wait before responding to a browser, without getting a Timeout?

余生长醉 提交于 2019-12-06 03:11:16
问题 I'm making a chat application that works with long-polling to emulate a "push" from server to client. Basically, the browser asks for updates, and I reply if there's something new. Otherwise, I keep the connection open without responding until there is something to send back. Now, if 30 seconds have passed and I haven't sent anything, then I do send a response, saying basically "NoNews", and the client will poll again. What I want to do is obviously keep this connection without replying for

How to make SignalR behave gracefully in case of disconnection

萝らか妹 提交于 2019-12-05 22:55:47
My application will often be used under fucked up corporate networks (proxy, firewalls, etc.) so I can not rely on sockets and long-polling is practically my only option. Here is my biggest problem with long-polling: Long-polling is disconnected at some point of time I automatically reconnect (accoring to documentation) User clicks something that causes hub method call but connection is not established yet - error happens. Is there any way to synchronize hub method call and reconnection like: I call hub method SignalR sees connection is not ready yet It waits till connection is ready and calls

How does fallback work with socket.io?

陌路散爱 提交于 2019-12-05 22:08:47
问题 I'd like to use WebSocket with Java . Problem is, my server is separated from the client by a proxy that cannot be configured. I've been searching for implementations of WebSocket with fallbacks such as long-polling . I've found socket.io but don't know how the fallback works. Under which case does it replace WebSocket and how? Are there other libraries like socket.io with fallbacks implementations? I would like to find one in Java , but I only found Jetty . EDIT: does the fallback only

jQuery ajax php long polling

谁说胖子不能爱 提交于 2019-12-05 18:31:34
I've been trying to get this long polling script to work but I keep getting stuck. This time I have a problem with the ajax request to the server. The php script that serves the data (running the long-poll using a loop and sleep) works perfectly fine but my jQuery script doesn't. So far I've tried using a normal $.ajax() request and a $.post() request to the script however when I do so the entire script stalls. Well the script actually loads like it is supposed to but the page shows that it keeps loading (using google chrome it shows the "waiting for" bar at the bottom of the screen). After

Asp.Net Signal R - Detect Changes in Database ? Asp.net Web Forms

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 06:47:05
问题 So I have a List View inside an Update Panel Update Panel List View Email 1 Email 2 Email 3 ... I'm trying to do an inbox similar to GMAIL in ASP.NET, the only I'm struggling with is how to detect DataBase Changes (ie when a new message is sent) and Push that message into the ListView to simulate that the user has received a new message (just like gmail does) How do I use SignalR to detect database changes and push them into the List View using SignalR? Is it possible? 回答1: If you are using

Web Chat Application using Long-Polling Technology with PHP,MySQL and jQuery [closed]

情到浓时终转凉″ 提交于 2019-12-05 05:52:11
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . We are using a chat system in our company which is build in Ajax, PHP and jQuery. Currently it refreshing in every second both in admin end and user end to pull data from mysql. Which makes the system inefficient and slower. I want to pull data from mysql only when an user or

JSONP Long Polling always loading

ぃ、小莉子 提交于 2019-12-05 02:24:21
问题 I'm doing long-polling with JSONP and firefox continually pops up the "Loading" spinner making the page seem like it hasn't finished loading. Is there a way to suppress this? I've been told that the Orbited team has hacks for suppressing this, but looking through the Orbited.js code I cannot figure out what they are. Any help would be greatly appreciated. 回答1: This is a simple fix.. All you have to do is start your polling request with a setTimeout.. Here is some code I use.. It uses jQuery,

PHP + Comet (long-polling) scaling / hosts

寵の児 提交于 2019-12-04 22:32:22
问题 I have developped an application using PHP/MySQL which used comet technology, presicely long-polling. The proof of concept works great, but I am expecting traffic to quickly reach thousands of simultanous connections = thousands of open connections on the webserver. I do not have the ability to setup my own server (e.g. using lighttpd), and usually rely on simple 5$/month PHP hostings for other web projects. However, I realize those won't do the trick as they are not meant to support such a

AJAX Polling Frequency - To long poll or not to long poll?

徘徊边缘 提交于 2019-12-04 16:45:34
问题 I'm building a component of a web page that needs relatively constant database polling. I can see two different approaches for this, and I'm wondering if one of them is better than the others, or if I'm missing a third option. 1) Send off an AJAX request every 1 or 2 seconds to check for updates. Each request returns immediately whether or not there is new data. 2) Fire off a single AJAX request that will not return until it receives data or a timeout occurs. Upon either of those happening,