|
|
@@ -140,6 +140,8 @@ ComontAlretViewControllerDelegate>
|
|
|
@property (nonatomic, assign) NSInteger concentTime; // 拉流数据 渲染更新时间戳
|
|
|
/**定时器计数*/
|
|
|
@property (nonatomic, assign) NSInteger currentTime;
|
|
|
+/**定时器计数*/
|
|
|
+@property (nonatomic, assign) NSInteger webSocketTime;
|
|
|
|
|
|
/**是否是收入进入云手机*/
|
|
|
@property (nonatomic, assign) BOOL isFirstEnterPhone;
|
|
|
@@ -496,6 +498,10 @@ ComontAlretViewControllerDelegate>
|
|
|
} receive:^(id message, FLSocketCloudPhoneReceiveType type) {
|
|
|
|
|
|
if([message isKindOfClass:[NSData class]] && [message length] == 0){
|
|
|
+ if(type == RCSocketCloudPhoneReceiveTypeForPong)
|
|
|
+ {
|
|
|
+ [weakSelf keepWebSocketOKFun];
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -735,6 +741,17 @@ ComontAlretViewControllerDelegate>
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+- (void)keepWebSocketOKFun
|
|
|
+{
|
|
|
+ self.webSocketTime = 0;
|
|
|
+}
|
|
|
+
|
|
|
+- (void)WebSocketNeedRelinkFun
|
|
|
+{
|
|
|
+ [self showNetErrorAlertFun:2];
|
|
|
+ [self opencommandChannelManagerrc_openURL];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark wifi handle
|
|
|
- (void)sync_wifiBackHandleFun
|
|
|
{
|
|
|
@@ -2745,6 +2762,7 @@ static int couneeee = 0;
|
|
|
self.adjustTime = 3;
|
|
|
self.concentTime = [iTools getNowTimeStamp];
|
|
|
self.currentTime = 0;
|
|
|
+ self.webSocketTime = 0;
|
|
|
|
|
|
_timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(timerChange) userInfo:nil repeats:YES];
|
|
|
[[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];
|
|
|
@@ -2764,6 +2782,15 @@ static int couneeee = 0;
|
|
|
|
|
|
|
|
|
[self checkConcentTime];// 3、30s之后 没有收到拉流数据 自动断开链接
|
|
|
+
|
|
|
+ //处理websockt是否断开
|
|
|
+ self.webSocketTime++;
|
|
|
+
|
|
|
+ if(self.webSocketTime == 8)
|
|
|
+ {
|
|
|
+ [self WebSocketNeedRelinkFun];
|
|
|
+ }
|
|
|
+ //HLog(@"webSocketTime %ld",self.webSocketTime);
|
|
|
}
|
|
|
|
|
|
// 3、30s之后 没有收到拉流数据 自动断开链接
|