socket连接优化
This commit is contained in:
parent
52e644f3ab
commit
14bad34f25
|
|
@ -15697,7 +15697,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
CURRENT_PROJECT_VERSION = 11;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
@ -15815,7 +15815,7 @@
|
|||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
CURRENT_PROJECT_VERSION = 11;
|
||||
DEVELOPMENT_TEAM = WFX8GD5HFX;
|
||||
ENABLE_BITCODE = NO;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@
|
|||
|
||||
self.clientSocket.userData = SocketOfflineByUser;// 声明是由用户主动切断
|
||||
|
||||
[self.clientSocket disconnect];
|
||||
[self.clientSocket disconnectAfterReadingAndWriting];
|
||||
self.clientSocket=nil;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
|
|
@ -16,11 +14,11 @@
|
|||
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="49.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ifishSetCell_back.png" translatesAutoresizingMaskIntoConstraints="NO" id="P3o-KY-LIT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="49.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="50"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="时段1" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yY6-WX-OcS">
|
||||
<rect key="frame" x="28" y="17" width="33" height="16"/>
|
||||
|
|
@ -29,9 +27,9 @@
|
|||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="05:00 - 10:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hQu-ZP-ugr">
|
||||
<rect key="frame" x="116" y="17" width="100" height="16"/>
|
||||
<rect key="frame" x="116" y="17" width="120" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="AIP-fQ-0bt"/>
|
||||
<constraint firstAttribute="width" constant="120" id="AIP-fQ-0bt"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="0.34901960780000002" green="0.34901960780000002" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ static NSString *setTimerflag = @"SetTimerCell";
|
|||
|
||||
|
||||
|
||||
[cell configTitleLabel:@"循环开关" timer:[NSString stringWithFormat:@"持续时长 %d分钟",[dataContorl hexToTen:model.lastTime]] switchStatus:isOn];
|
||||
[cell configTitleLabel:@"循环开关" timer:[NSString stringWithFormat:@"持续时长%d分钟",[dataContorl hexToTen:model.lastTime]] switchStatus:isOn];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,8 +190,13 @@
|
|||
[[Socketsingleton sharedInstance].clientSocket readDataWithTimeout:-1 tag:0];
|
||||
|
||||
}else{// socket中断
|
||||
[[Socketsingleton sharedInstance] cutOffSocket];
|
||||
[weakSelf InitSocket];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[weakSelf endRefreshing];
|
||||
});
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
|
@ -976,7 +981,7 @@
|
|||
[self.navigationController pushViewController:_settingVC animated:YES];
|
||||
}else{
|
||||
[self.indicatorView stopAnimating];
|
||||
[self showLableAction:@"设备已离线"];
|
||||
[self showLableAction:@"设备连接中,或离线"];
|
||||
[self.XuTohud hidmyHud];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue