long-polling

Asp.net session never expires when using SignalR and transport mode long polling

前提是你 提交于 2019-12-03 22:31:55
We have a web application that uses SignalR for its notification mechanism.The problem is when we are browsing our web application using IE ,SignalR uses Long Polling as its transport type thus sends back requests to our web server therefore Session never expires no matter how long the browser is idle. We were thinking that maybe we could catch the requests in Global.asax and see if they were from SingalR and set the session timeout to the remaining time (Which I don't think it's a straightforward solution). Is there any other solution the we are missing ? The workaround I am currently using

Long-polling android technology

情到浓时终转凉″ 提交于 2019-12-03 21:50:39
I have some easy question. Can I make long polling on java, using only AsyncTask? class makepolling extends AsyncTask<String, String, String> { String TAG = "AndroidPolling"; int CONNECTION_TIMEOUT = 900000; int mHeartbeat = 10000; int TIMEOUT_TOLERANCE = 5000; String mPushURL = "https://my_serv_adress/service"; @Override protected String doInBackground(String... arg0) { String result = null; DefaultHttpClient def = new DefaultHttpClient(); HttpParams httpParams = def.getParams(); HttpConnectionParams.setConnectionTimeout(httpParams, CONNECTION_TIMEOUT); ConnManagerParams.setTimeout(httpParams

Implementing long-polling with jQuery and PHP

只谈情不闲聊 提交于 2019-12-03 20:27:17
问题 I want to build a chat, based on JavaScript (jQuery will be used for AJAX) and PHP. I've heard a good way of doing this is to use long-polling. I do understand the idea, but I don't know how to implement it on the server side. An infinite loop sounds like a bad idea. 回答1: You don't want to create an infinite loop, but you can set a timeout. Basically loop for X second waiting for some sort of data, and if that doesn't happen send a response to the client telling it that it needs to initiate a

JSONP Long Polling always loading

你说的曾经没有我的故事 提交于 2019-12-03 17:25:59
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. 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, but I assume you can figure out what you need to and use your library to do the same. <script type="text

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

南楼画角 提交于 2019-12-03 17:22:21
Closed . This question needs to be more focused. It is not currently accepting answers. Learn more . 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 admin send a message. But the problem is : How I will check from admin end that an user send

How to catch “[Errno 32] Broken pipe” in a WSGI handler

纵然是瞬间 提交于 2019-12-03 17:06:25
WSGI is extremely useful for building highly concurrent HTTP servers to support e.g. long polling, however, typically, the long running HTTP request will at some point be ended by the client side; to clean up any resources and open handles, the WSGI server backend should be notified of any such events, however, it doesn't currently seem to be possible to catch those events in the WSGI handler: # pseudocode example def application(env, start_response): start_response(...) q = Queue() ev_handle = register_event_handler(lambda event, arg: q.put((event, arg))) # ??? need to call e.g. ev_handle

How does Google Analytics Real Time work?

佐手、 提交于 2019-12-03 14:29:26
I'm wondering how Google Analytics Real Time user interface works, what's the technique ? Do they use long-polling from the client to keep the UI statistics instantly up to date by delivering realtime information from the server to the client? I just open Chrome dev tool on network tab and there is a infinite request on https://www.google.com/analytics/realtime/bind Does anybody know the trick? It works flawless... The below refers to how the real time data is collected, not how the UI updates. (It looks like the UI is just using AJAX polling on the client-side, though) No special polling or

PHP + Comet (long-polling) scaling / hosts

不羁岁月 提交于 2019-12-03 14:25:23
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 high number of simultanous open connections. What are my other options? I could not find any host

what's the skinny on long polling with ajax and webapi…is it going to kill my server? and string comparisons

谁都会走 提交于 2019-12-03 13:31:38
问题 I have a very simple long polling ajax call like this: (function poll(){ $.ajax({ url: "myserver", success: function(data){ //do my stuff here }, dataType: "json", complete: poll, timeout: 30000 }); })(); I just picked this example up this afternoon and it seems to work great. I'm using it to build out some html on my page and it's nearly instantaneous as best I can tell. I'm a little worried though that this is going to keep worker threads open on my server and that if I have too big of a

How can I update HTML pages dynamically with Indy HTTP server using jQuery and “Long Polling”?

痴心易碎 提交于 2019-12-03 13:06:20
问题 I have read the article Simple Long Polling Example with JavaScript and jQuery. The paragraph "Long Polling - An Efficient Server-Push Technique" explains that the Long Polling technique combines the best-case traditional polling with persistent remote server connections. The term Long Polling itself is short for long-held HTTP request. How can I implement a Indy based HTTP server which uses Long Polling? 回答1: Here is a self-contained example project, tested with Indy version 10.5.9 and