手机网络一个connect的一般在6秒内(正常wifi网络connect是1秒之内,一次测试的记录是151毫秒,一次79毫秒)能建立成功(若10秒建立不成功,基本上就没戏。我在华为时用受限网络connect时,发现最大超时能返回结果的时间是75秒后来我记错了,记成90秒了。今年我换工作面试时和一个志同道合和的同行(面试官)说手机的socket套接字异常超时时间是90秒,它纠正说是75秒。若出现wifi闪断或wifi网络和4g网络间切换,收到网络正常公告,立刻建立socket,由于网络虚电路还没有稳定,可能超过30秒也建立不成功,需要再重新建立连接。今天我测试用我们公司的Geely-W受限wifi网络,connect75秒返回结果。
window系统soket默认超时时间是240秒,如文章https://msdn.microsoft.com/zh-cn/library/aa560610中一个描述:降低客户端 TCP/IP 套接字连接的超时值(默认值为 240 秒))。
若是既时通信的软件建立socket达到240秒才知道最终结果,那么黄瓜菜都凉了,所以只要监控到sokcet套接字超过10秒不返回直接可以判它死罪,推倒重来。就是苹果系统阻塞的线程不能立即结束,那么我再起个线程还不行吗?等你起醒来再干掉你。
我写的那个守护线程的文章(http://blog.csdn.net/jia12216/article/details/50016167)就是为了解决这种长连接,在那里连啊连,就是姗姗来迟的问题。你消极我杀杀,直到你正常为止。
当然在连接前还是要判断一下网络,若没有网络,你连接到爪哇国去呀!
手机网络要比电脑网络差的多。如:
1.wifi信号超过覆盖区域自动切换到手机网络,收到网络异常通知,收不到网络正常通知;2.从没有网络的地方进入wifi信号覆盖区,本手机又记录了该wifi的信息,自动接入 wifi又能正常访问网络。
3.从没有网络的地方进入wifi信号覆盖区,本手机又记录了该wifi的信息,自动接入 wifi却不能正常访问网络。
4.从没有手机网络的地方进入有手机网络的区域。
5.从2g手机网络的地方进入有3g手机网络的区域。
6.从3g手机网络的地方进入有4g手机网络的区域。
当然也有手机切换到到后台3到10分钟内应用被挂起,长连接线程也嗝屁了。用户把它从后台救出来,那么也要把这个挂起的长连接线程修理修理了。它们要通过守护线程处理这类socket套接字超时的问题。
Geely-W这类受限wifi网络的特点有,连接时有时候会自动弹出让你输入用户名和密码,有时候连接时又不弹出让你输入用户名和密码。当然无论弹出不弹出,你只要不输入用户名和密码打开网页将失败,并且它也会自动连接到这个wifi。当手机关闭4g网络,IOS手机连接到这样的受限网络时,用[self.reachability stopNotifier];和[self.reachability startNotifier];重新检查网络时,收到的kReachabilityChangedNotification通知是网络正常。江南大道东信路口那个公交站的那个aibinjiang的免费wifi也是类似的受限网络。
手机连接受限wifi网络,connect75秒超时的日志(1449034518 - 1449034443):
2015-12-02 13:34:03:301 caocao[1925:1539773] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1812 Debug:connect before:_connectTime = 1449034443, Thread Sno: 8 2015-12-02 13:34:04:071 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:04:072 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:04:072 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:04:074 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:04:075 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:08:199 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:08:200 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:08:200 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:08:200 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:08:200 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:17:204 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:17:205 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:17:205 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:17:205 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:17:207 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:19:445 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:19:445 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:19:445 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:19:445 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:19:445 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:28:365 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:28:366 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:28:366 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:28:366 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:28:366 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:30:548 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:30:548 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:30:548 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:30:548 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:30:548 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:39:534 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:39:534 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:39:534 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:39:535 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:39:535 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:40:192 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:40:193 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:40:193 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:40:193 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:40:194 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:49:189 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:49:189 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:49:190 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:49:190 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:49:191 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:34:53:179 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:53:179 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:53:179 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:34:53:180 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:34:53:180 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:35:02:168 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:02:168 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:02:168 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:02:169 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:02:169 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:35:04:379 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:04:379 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:04:379 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:04:379 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:04:379 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:35:13:369 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:13:369 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:13:369 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:13:369 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:13:369 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 2015-12-02 13:35:15:626 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:15:626 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:15:627 caocao[1925:1539695] Singleton.m:-[Singleton getLatitudeAll]:392 Debug:函数 2015-12-02 13:35:15:630 caocao[1925:1539695] Singleton.m:-[Singleton getLongitudeAll]:404 Debug:函数 2015-12-02 13:35:15:631 caocao[1925:1539695] Singleton.m:-[Singleton getDistanceWithStartLat:startLng:endLat:endLng:]:564 Debug:函数 socket: Operation timed out 2015-12-02 13:35:18:366 caocao[1925:1539773] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1816 Debug:connect after:_connectTime = 1449034518, Thread Sno: 8
这个是正常wifi网络手机建立connect连接时间是151毫秒,日志中提高了时间精度毫秒级别(1449038082136-1449038081985):
2015-12-02 14:34:41:985 caocao[1966:1564454] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1807 Debug:connect before:_connectTime = 1449038081985, Thread Sno: 8 2015-12-02 14:34:41:986 caocao[1966:1564466] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2595 Debug:ret = 1 2015-12-02 14:34:41:986 caocao[1966:1564466] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2607 Debug:pipe data:GuardThreadStartMonitor 2015-12-02 14:34:41:986 caocao[1966:1564466] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2618 Debug:收到守护线程开始监控的消息,开始实时监控长连接线程:GuardThreadStartMonitor 2015-12-02 14:34:42:002 caocao[1966:1564375] AppDelegate.m:-[AppDelegate GexinSdkDidRegisterClient:]:734 Debug:函数 2015-12-02 14:34:42:002 caocao[1966:1564375] AppDelegate.m:-[AppDelegate setGeXinPushId:]:514 Debug:函数 2015-12-02 14:34:42:002 caocao[1966:1564375] HttpManager.m:-[HttpManager(HttpRequest) HttpRequest:method:ifShowHUD:ifGET:timeoutInterval:onCompletion:]:429 Debug:函数 2015-12-02 14:34:42:002 caocao[1966:1564375] HttpManager.m:-[HttpManager getAndPostCacheToUrl:params:timeoutInterval:IFGET:complete:]:225 Debug:函数 2015-12-02 14:34:42:002 caocao[1966:1564375] HttpManager.m:-[HttpManager requestToUrl:method:useCache:timeoutInterval:params:complete:]:244 Debug:函数 2015-12-02 14:34:42:004 caocao[1966:1564375] HttpManager.m:-[HttpManager requestToUrl:method:useCache:timeoutInterval:params:complete:]:249 Debug:request paramters:{ driverId = 6; mobileType = ios; pushId = cd8cc1b871e9a9373657527a15e4006f; reqToken = 494e00907a034273ff456f97d0218950; token = ""; version = 1; } request url:https://121.40.30.53/caocao/driver/setPushId.do?driverId=6&mobileType=ios&pushId=cd8cc1b871e9a9373657527a15e4006f&reqToken=494e00907a034273ff456f97d0218950&token=&version=1 2015-12-02 14:34:42:137 caocao[1966:1564454] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1811 Debug:connect after:_connectTime = 1449038082136, Thread Sno: 8
这个是正常wifi网络手机建立connect连接时间是79毫秒,日志中提高了时间精度毫秒级别(1449038675697-1449038675618):
2015-12-02 14:44:35:618 caocao[1979:1568668] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1807 Debug:connect before:_connectTime = 1449038675618, Thread Sno: 8 2015-12-02 14:44:35:619 caocao[1979:1568656] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2595 Debug:ret = 1 2015-12-02 14:44:35:619 caocao[1979:1568656] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2607 Debug:pipe data:GuardThreadStartMonitor 2015-12-02 14:44:35:619 caocao[1979:1568656] SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2622 Debug:收到守护线程开始监控的消息,开始实时监控长连接线程:GuardThreadStartMonitor 2015-12-02 14:44:35:628 caocao[1979:1568574] HttpManager.m:-[HttpManager showMessageWithOperation:method:params:]:481 Debug:函数 2015-12-02 14:44:35:629 caocao[1979:1568574] HttpManager.m:__76-[HttpManager requestToUrl:method:useCache:timeoutInterval:params:complete:]_block_invoke:258 Debug:operation request url:https://121.40.30.53/caocao/driver/setDriverToken.do?driverId=6&driverToken=7a3d59e117e11e6b2407754a651836f9292ecf01c3e65dbc27a5e3ec1886d224&reqToken=494e00907a034273ff456f97d0218950&token=&version=1 2015-12-02 14:44:35:629 caocao[1979:1568574] HttpManager.m:__76-[HttpManager requestToUrl:method:useCache:timeoutInterval:params:complete:]_block_invoke:259 Debug: responseObject:{ status = 1; } 2015-12-02 14:44:35:629 caocao[1979:1568574] SingleAsyncSocket.m:-[SingleAsyncSocket getNetworkStatus]:54 Debug:函数 2015-12-02 14:44:35:629 caocao[1979:1568574] SingleAsyncSocket.m:-[SingleAsyncSocket getNetworkStatus]:54 Debug:函数 socket: Bad file descriptor 2015-12-02 14:44:35:697 caocao[1979:1568668] SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1811 Debug:connect after:_connectTime = 1449038675697, Thread Sno: 8
网络切换收到网络正常公告,立刻建立socket,30秒没有建立成功的日志:
2015/12/08 19:41:10:597 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1369 Debug:handleNetChanged 2015/12/08 19:41:10:598 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1379 Debug:收到网络正常通知。 网络状态:1 2015/12/08 19:41:10:598 StartOrderViewController.m:-[StartOrderViewController reachabilityRecove:]:153 Debug:函数 2015/12/08 19:41:10:598 MainViewController.m:-[MainViewController reachabilityRecove:]:747 Debug:函数 2015/12/08 19:41:10:600 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1354 Debug:函数 2015/12/08 19:41:10:601 SingleAsyncSocket.m:-[SingleAsyncSocket setNetworkStatus:]:105 Debug:函数 2015/12/08 19:41:10:601 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1369 Debug:handleNetChanged 2015/12/08 19:41:10:601 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1379 Debug:收到网络正常通知。 网络状态:2 2015/12/08 19:41:10:602 StartOrderViewController.m:-[StartOrderViewController reachabilityRecove:]:153 Debug:函数 2015/12/08 19:41:10:602 MainViewController.m:-[MainViewController reachabilityRecove:]:747 Debug:函数 2015/12/08 19:41:10:602 SingleAsyncSocket.m:-[SingleAsyncSocket sendWiFiWWANChangeSocket]:695 Debug:函数 2015/12/08 19:41:10:603 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2128 Debug:ret2= 1 2015/12/08 19:41:10:603 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2206 Debug:i= 0 2015/12/08 19:41:10:603 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2207 Debug:errno:22 2015/12/08 19:41:10:604 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2398 Debug:ret4= 0 2015/12/08 19:41:10:604 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2400 Debug:i= 0 2015/12/08 19:41:10:604 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2429 Debug:ret2= 2 2015/12/08 19:41:10:604 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2441 Debug:data:,net change 2015/12/08 19:41:10:604 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:2462 Debug:收到发送消息管道消息:,net change 2015/12/08 19:41:10:607 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1738 Debug:SKIP fd= 31 2015/12/08 19:41:10:607 Singleton.m:-[Singleton getLoginOrderStat]:265 Debug:函数 2015/12/08 19:41:10:610 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1825 Debug:socket sucess 2015/12/08 19:41:10:610 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1826 Debug:g_fd= 31 2015/12/08 19:41:10:611 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1831 Debug:main loop 2015/12/08 19:41:10:611 Singleton.m:-[Singleton getLoginOrderStat]:265 Debug:函数 2015/12/08 19:41:10:611 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1902 Debug:connect before:_connectTime = 1449574870610, Thread Sno: 18 2015/12/08 19:41:10:618 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2711 Debug:ret = 1 2015/12/08 19:41:10:618 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2723 Debug:pipe data:GuardThreadStartActualTimeMonitor 2015/12/08 19:41:10:619 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2739 Debug:收到守护线程开始实时监控的消息,开始实时监控长连接线程:GuardThreadStartActualTimeMonitor 2015/12/08 19:41:25:631 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2762 Debug:select 超时! 2015/12/08 19:41:34:781 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1354 Debug:函数 2015/12/08 19:41:34:781 SingleAsyncSocket.m:-[SingleAsyncSocket setNetworkStatus:]:105 Debug:函数 2015/12/08 19:41:34:782 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1369 Debug:handleNetChanged 2015/12/08 19:41:34:782 SingleAsyncSocket.m:-[SingleAsyncSocket reachabilityDidChanged:]:1379 Debug:收到网络正常通知。 网络状态:2 2015/12/08 19:41:34:782 StartOrderViewController.m:-[StartOrderViewController reachabilityRecove:]:153 Debug:函数 2015/12/08 19:41:34:783 MainViewController.m:-[MainViewController reachabilityRecove:]:747 Debug:函数 2015/12/08 19:41:40:711 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2762 Debug:select 超时! 2015/12/08 19:41:40:712 SingleAsyncSocket.m:-[SingleAsyncSocket creatPushConnection]:1645 Debug:函数 2015/12/08 19:41:40:712 SingleAsyncSocket.m:-[SingleAsyncSocket socketBSDThread]:1678 Debug:函数 2015/12/08 19:41:40:712 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2711 Debug:ret = 1 2015/12/08 19:41:40:712 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2723 Debug:pipe data:GuardThreadIdle 2015/12/08 19:41:40:713 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2730 Debug:收到守护线程空闲的消息,停止实时监控长连接线程:GuardThreadIdle 2015/12/08 19:41:40:713 SingleAsyncSocket.m:-[SingleAsyncSocket storeSocketThreadSno]:1616 Debug:函数 2015/12/08 19:41:40:713 SingleAsyncSocket.m:-[SingleAsyncSocket storeSocketThreadSno]:1634 Debug:SocketThreadSn:26 2015/12/08 19:41:40:713 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1705 Debug:socket thread 2015/12/08 19:41:40:714 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1738 Debug:SKIP fd= -1 2015/12/08 19:41:40:714 Singleton.m:-[Singleton getLoginOrderStat]:265 Debug:函数 2015/12/08 19:41:40:715 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1825 Debug:socket sucess 2015/12/08 19:41:40:716 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1826 Debug:g_fd= 32 2015/12/08 19:41:40:716 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1831 Debug:main loop 2015/12/08 19:41:40:716 Singleton.m:-[Singleton getLoginOrderStat]:265 Debug:函数 2015/12/08 19:41:40:716 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1902 Debug:connect before:_connectTime = 1449574900715, Thread Sno: 26 2015/12/08 19:41:40:717 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2711 Debug:ret = 1 2015/12/08 19:41:40:717 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2723 Debug:pipe data:GuardThreadStartActualTimeMonitor 2015/12/08 19:41:40:717 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2739 Debug:收到守护线程开始实时监控的消息,开始实时监控长连接线程:GuardThreadStartActualTimeMonitor 2015/12/08 19:41:42:751 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1906 Debug:connect after:_connectTime = 1449574902751, Thread Sno: 26 2015/12/08 19:41:42:752 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1954 Debug:errno:9 2015/12/08 19:41:42:752 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1987 Debug:i= 0 2015/12/08 19:41:42:753 SingleAsyncSocket.m:__36-[SingleAsyncSocket socketBSDThread]_block_invoke:1989 Debug:error : 9 2015/12/08 19:41:42:753 Singleton.m:-[Singleton getLoginOrderStat]:265 Debug:函数 2015/12/08 19:41:42:753 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2711 Debug:ret = 1 2015/12/08 19:41:42:753 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2723 Debug:pipe data:GuardThreadStartRegularMonitor 2015/12/08 19:41:42:754 SingleAsyncSocket.m:__32-[SingleAsyncSocket guardThread]_block_invoke:2748 Debug:收到守护线程开始常规监控的消息,开始常规监控长连接线程:GuardThreadStartRegularMonitor