English 中文(简体)
经常与XHR-Polling、Socket.io和Tatsium脱节
原标题:Frequent disconnects with XHR-Polling, Socket.io and Titanium

https://github.com/nowelium/socket.io-titanium” rel=“nofollow” 到目前为止,“港口”只是支持XHR-polling运输。 过去,我手头取得了成功。 • 利用网络电话运输。

现在的问题是,我的袖珍连接似乎每10秒“dr落”,每次只有几秒。 这就是说,聊天信息被放弃等。 这一预期行为与XHR-polling——我是否需要实施一个格外制度——或者我是否可以找到解决这个问题的办法?

   debug - setting poll timeoutdebug - discarding transport
   debug - cleared close timeout for client 407473253144647189
   debug - clearing poll timeout
   info  - transport end
   debug - set close timeout for client 407473253144647189
   debug - cleared close timeout for client 407473253144647189
   debug - discarding transport
   debug - client authorized
   info  - handshake authorized 4149191422068834219
   debug - setting request GET /socket.io/1/xhr-polling/4149191422068834219?t=Thu%20Jan%2012%202012%2022%3A37%3A47%20GMT-0800%20%28PST%29
   debug - setting poll timeout
   debug - client authorized for 
   debug - clearing poll timeout
   debug - xhr-polling writing 1::
   debug - set close timeout for client 4149191422068834219
Connection
   debug - setting request GET /socket.io/1/xhr-polling/4149191422068834219?t=Thu%20Jan%2012%202012%2022%3A37%3A47%20GMT-0800%20%28PST%29
   debug - setting poll timeout
   debug - discarding transport
   debug - cleared close timeout for client 4149191422068834219
Last login: Fri Jan 13 00:04:14 on ttys003
问题回答

为什么不通过T.App.fire把你装满。 活动/活动 这给你带来了网上票价,而网上票价确实有限。

<html>
<head>
    <script src="http://63.10.10.123:1337/socket.io/socket.io.js"></script>
    <script>
        var socket = io.connect( http://63.10.10.123:1337 );
        socket.on( onSomething , function (data) {
            Ti.App.fireEvent( onSomething , data);
        });
        Ti.App.addEventListener( emitSomething , function (data) {
            socket.emit( emitSomething , data);
        });
    </script>
</head>
<body>
</body>
</html>

EDIT:我要指出,我是在一个项目中这样做的,而且我非常一贯地在Sito。 我在座,而其他发展中国家甚至没有使用 Titan,也正在打上这种火焰。 我不建议采取这种做法,或至少彻底测试这种办法(特别是背景和复读)。 相反,我使用审校的笔录,用我自己的光机将数据从客户到服务器和服务器到客户。





相关问题
XMLHttpRequest used to find quicker server

I have a situation where my website needs to quickly retrieve data from my server via AJAX. My website runs on port 80, serving normal web pages. I normally run my AJAX server on port 8001 (I use ...

AJAX readystate

This script sends a request to a Apache web server every 500ms to retrieve an XML document using AJAX. This script functioned correctly on all the browsers listed below until recently. Now the ...

Is nested XMLHttpRequests with multiple closures a good idea?

I have a Greasemonkey script which operates on a search results page at a video site. The function of the script is to take a javascript link that opens a new window with a flash player, jump through ...

How to emulate XMLHttpRequest client using PHP?

I m looking for an example how to emulate XMLHttpRequest client using PHP. In other words, send the request over HTTP POST message, and receive and process the callback message.

xmlHttpRequest and returned url

With help of xmlHttpRequest I make a server query. After that the server is redirecting to another page (e.g. "http://site.com/index.html;var=123") The question is - how can I get full url(side.com/...

热门标签