long-polling

Socket.IO server hangs up

ε祈祈猫儿з 提交于 2019-12-11 07:53:22
问题 I am new to socket.io. So my socket.io server sometimws crashes giving this below error timers.js:103 if (!process.listeners('uncaughtException').length) throw e; ^ Error: socket hang up at createHangUpError (http.js:1360:15) at ServerResponse.OutgoingMessage._writeRaw (http.js:507:26) at ServerResponse.OutgoingMessage._send (http.js:476:15) at ServerResponse.OutgoingMessage.write (http.js:749:16) at XHRPolling.doWrite (E:\sitesroot\0\node_modules\socket.io\lib\transports\ xhr-polling.js:67

Tomcat 7 server error after 10 seconds when long polling

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 02:55:44
问题 I'm trying to achieve long-polling in Java web application. The application is written using Spring MVC 3.2 and I make use of DeferredResult object (it represents Servlet 3.0 async response capability). The problem is that when using DeferredResult I get internal server error (code 500) after 10 seconds every time I send request. Expected result is text data after 30 seconds. There is nothing in my app logs, nothing in Tomcat logs but in FireFox network monitor I see this 500 error. On the

IE8 stops network access after 5 long polling request

社会主义新天地 提交于 2019-12-11 00:44:42
问题 I am using Long Polling as a push mechanism in my system. It is working fine in Firefox & Chrome, but in IE8 the behaviour is quite strange: It loads OK for 5 times (i.e. I am able to refresh(F5) the page 5 times, the html is loaded and all scripts are running correctly) after which, IE8 refuses to perform and network connection (I've checked with Fiddler2) and simply shows the "loading" icon infinitely. The only cure at this stage, is to close and open the browser itself. I am using JQuery

Is it possible to miss websocket events

假装没事ソ 提交于 2019-12-10 17:36:04
问题 Here is what we're doing : We use Socket.io to broadcast our events. We experienced troubles with proxies and/or firewalls, so we only used socket.io with XHR-Polling, not Websockets. It was working well, but a lot of our users are using our app with smartphones, or bad internet connections. Sometimes, they were never receiving the broadcasted events, despite the fact they were still connected to our Node server. So we added an additional long-polling system, which looks at what you received

How to session_write_close() in Laravel?

天大地大妈咪最大 提交于 2019-12-10 16:58:11
问题 Running session_write_close() before sleep() in Laravel doesn't seem to be functioning as the session is still blocked from other requests until the current connection is complete. I'm trying to sleep() in Laravel without blocking other requests. Found out that session_write_close() should resolve the problem as mentioned here: Long polling in Laravel (sleep() function make application freeze). But it doesn't work. sleep() is still blocking other requests. The project app is a chat app using

Why setting a client-side timeout when using long polling?

喜欢而已 提交于 2019-12-10 14:43:54
问题 In almost every long polling examples I see, there is something like a timeout of 30 seconds client-side. What is the precise reason for this? 回答1: Some routers, proxies or whatever device there is in the middle might decide to drop TCP/IP connections being idle for extensive period of time. Also refreshing connection once in a while makes sure you'll discover server failure quicker. 来源: https://stackoverflow.com/questions/14903223/why-setting-a-client-side-timeout-when-using-long-polling

Understanding long polling: client (android) and server (asp net)

冷暖自知 提交于 2019-12-10 14:42:30
问题 I'm developing android application where users can compete in some kind of battles. On the server side I need to receive requests from user for starting a battle, and then, using some algorithm, choose the most preferable opponent for him. During a battle I also need to send notifications to competitors about their opponent's actions. So it seems that I need to implement long polling on my server. My questions are: Server side . I'm using asp.net mvc server. I had a look at SignalR framework

Longpolling vs Websockets [closed]

别等时光非礼了梦想. 提交于 2019-12-10 13:18:53
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I start developing a software, app coded using html + js I need to send this app notification from the server (java code) the app using nginx for routiong and is hosted in AWS. I investigated this subject of real time notification and I get confused between web sockets to

Python's Bottle & Long-Polling?

半腔热情 提交于 2019-12-10 11:34:03
问题 I currently have a one-page Bottle project working through localhost:8080 . For the purposes of this question, assume that single page is naught but a basic short-polling chat, retrieving chatline objects from Python that contain only the sender's name and the body of the message. Those chatline objects are stored in chat objects, with the project allowing multiple chats. The chat and sender is determined by the URL. For example, if a chatline is sent from localhost:8080/chat/23/50 , it is

LONG POLLING (in php) starts hanging after 5 requests to database

社会主义新天地 提交于 2019-12-10 10:20:47
问题 I'm developing live auction site, with real-time bidding system. I'm using LONG POLLING when user bids on item. I've chose long polling because WebSockets are not yet very supported and NODEJS is to complicated for me to implement right now. So I'm stuck with this simle ajax long polling, which works great for about five bids. So the problem is: Bidding works great for 5-6 item bids in 1 second intervals (I get instant response from server-ajax), but the 7th (click) on bid button this