Pārlūkot izejas kodu

1111 代码暂存

huangxiaodong 5 mēneši atpakaļ
vecāks
revīzija
3a9c06ae96

+ 20 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -190,6 +190,10 @@
 		6B0D004C2BFE104B00F02719 /* queryOneShareModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0D00492BFE104B00F02719 /* queryOneShareModel.h */; };
 		6B0D004D2BFE104B00F02719 /* queryOneShareModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0D00492BFE104B00F02719 /* queryOneShareModel.h */; };
 		6B0D004E2BFE104B00F02719 /* queryOneShareModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0D004A2BFE104B00F02719 /* queryOneShareModel.m */; };
+		6B1B0AE32D1AA1EF0044FC55 /* webRtcPingManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1B0AE12D1AA1EF0044FC55 /* webRtcPingManager.h */; };
+		6B1B0AE42D1AA1EF0044FC55 /* webRtcPingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1B0AE22D1AA1EF0044FC55 /* webRtcPingManager.m */; };
+		6B1B0AE52D1AA1EF0044FC55 /* webRtcPingManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1B0AE12D1AA1EF0044FC55 /* webRtcPingManager.h */; };
+		6B1B0AE62D1AA1EF0044FC55 /* webRtcPingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1B0AE22D1AA1EF0044FC55 /* webRtcPingManager.m */; };
 		6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */; };
 		6B1CC2C72B677F3E00AD4217 /* extraMediaEventModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */; };
 		6B1CC2CA2B67A5FC00AD4217 /* USBInsertPopView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2C82B67A5FC00AD4217 /* USBInsertPopView.h */; };
@@ -1687,6 +1691,8 @@
 		6B0A75DE2C4CA3D300DCB32D /* audioPlayingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = audioPlayingView.m; sourceTree = "<group>"; };
 		6B0D00492BFE104B00F02719 /* queryOneShareModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = queryOneShareModel.h; sourceTree = "<group>"; };
 		6B0D004A2BFE104B00F02719 /* queryOneShareModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = queryOneShareModel.m; sourceTree = "<group>"; };
+		6B1B0AE12D1AA1EF0044FC55 /* webRtcPingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = webRtcPingManager.h; sourceTree = "<group>"; };
+		6B1B0AE22D1AA1EF0044FC55 /* webRtcPingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = webRtcPingManager.m; sourceTree = "<group>"; };
 		6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = extraMediaEventModel.h; sourceTree = "<group>"; };
 		6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = extraMediaEventModel.m; sourceTree = "<group>"; };
 		6B1CC2C82B67A5FC00AD4217 /* USBInsertPopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = USBInsertPopView.h; sourceTree = "<group>"; };
@@ -2876,6 +2882,15 @@
 			path = uploadFileManager;
 			sourceTree = "<group>";
 		};
+		6B1B0AE02D1AA1960044FC55 /* webRtcPingManager */ = {
+			isa = PBXGroup;
+			children = (
+				6B1B0AE12D1AA1EF0044FC55 /* webRtcPingManager.h */,
+				6B1B0AE22D1AA1EF0044FC55 /* webRtcPingManager.m */,
+			);
+			path = webRtcPingManager;
+			sourceTree = "<group>";
+		};
 		6B21708E2B15BAC300656670 /* privacyMode */ = {
 			isa = PBXGroup;
 			children = (
@@ -3465,6 +3480,7 @@
 		6B8676802C855ECC00F81DFC /* webRtc */ = {
 			isa = PBXGroup;
 			children = (
+				6B1B0AE02D1AA1960044FC55 /* webRtcPingManager */,
 				6B3E7A862C8A9FDC00B032C4 /* pingManager */,
 				6B3E7A7F2C89CBF100B032C4 /* webRtcManager */,
 				6B3E7A722C89609E00B032C4 /* view */,
@@ -4217,6 +4233,7 @@
 				6B0581AF2AFCF57300D37290 /* AJPhotoGroupCell.h in Headers */,
 				6B5D401A2B4A9850000965CF /* couldPhoneFolderListModel.h in Headers */,
 				6B1CC2CA2B67A5FC00AD4217 /* USBInsertPopView.h in Headers */,
+				6B1B0AE32D1AA1EF0044FC55 /* webRtcPingManager.h in Headers */,
 				6B833A832C48F3B300F9F1D0 /* customToastVew.h in Headers */,
 				6B2C1E702C070ADE00FDCF82 /* ZFLandscapeViewController_iOS15.h in Headers */,
 				6BED888E2B4E901900F76DDC /* downloadFileRecordCell.h in Headers */,
@@ -4508,6 +4525,7 @@
 				6BD506E62B9576A4006E7CB0 /* AJPhotoGroupCell.h in Headers */,
 				6BD506E72B9576A4006E7CB0 /* couldPhoneFolderListModel.h in Headers */,
 				6BD506E82B9576A4006E7CB0 /* USBInsertPopView.h in Headers */,
+				6B1B0AE52D1AA1EF0044FC55 /* webRtcPingManager.h in Headers */,
 				6B833A842C48F3B300F9F1D0 /* customToastVew.h in Headers */,
 				6B2C1E712C070ADE00FDCF82 /* ZFLandscapeViewController_iOS15.h in Headers */,
 				6BD506E92B9576A4006E7CB0 /* downloadFileRecordCell.h in Headers */,
@@ -5216,6 +5234,7 @@
 				6BD507812B9576A4006E7CB0 /* SceneDelegate.m in Sources */,
 				6BD507822B9576A4006E7CB0 /* privacyModeTipViewController.m in Sources */,
 				6BD507832B9576A4006E7CB0 /* photosBackupsTaskModel.m in Sources */,
+				6B1B0AE62D1AA1EF0044FC55 /* webRtcPingManager.m in Sources */,
 				6BD507842B9576A4006E7CB0 /* privacyModeViewController.m in Sources */,
 				6BD507852B9576A4006E7CB0 /* AFHTTPSessionManager.m in Sources */,
 				6BD507862B9576A4006E7CB0 /* AFNetworkReachabilityManager.m in Sources */,
@@ -5589,6 +5608,7 @@
 				A003F6E327D8428200715CBF /* SceneDelegate.m in Sources */,
 				6B2170A12B15D39900656670 /* privacyModeTipViewController.m in Sources */,
 				6B1FBD272B4503E700926382 /* photosBackupsTaskModel.m in Sources */,
+				6B1B0AE42D1AA1EF0044FC55 /* webRtcPingManager.m in Sources */,
 				6B2170922B15BAE700656670 /* privacyModeViewController.m in Sources */,
 				183AE6552A8A2CF000B11CB0 /* AFHTTPSessionManager.m in Sources */,
 				183AE6582A8A2CF000B11CB0 /* AFNetworkReachabilityManager.m in Sources */,

BIN
创维盒子/双子星云手机.xcworkspace/xcuserdata/xdh.xcuserdatad/UserInterfaceState.xcuserstate


+ 20 - 114
创维盒子/双子星云手机.xcworkspace/xcuserdata/xdh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -290,36 +290,6 @@
             endingLineNumber = "392"
             landmarkName = "-setLanMas_makeWithImageRate:isOpenVirtual:isUsageMode:"
             landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "D92195D1-CA82-4378-A2CE-634F99BBB202 - 907b8143c8ae3a73"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[PlayerView setLanMas_makeWithImageRate:isOpenVirtual:isUsageMode:]"
-                  moduleName = "&#x9690;&#x79c1;&#x4fdd;&#x62a4;"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/xdh/Desktop/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%8F%8C%E5%AD%90%E6%98%9F%E4%BA%91%E6%89%8B%E6%9C%BA/CloudPlayer/View/PlayerView.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "392"
-                  endingLineNumber = "392">
-               </Location>
-               <Location
-                  uuid = "D92195D1-CA82-4378-A2CE-634F99BBB202 - 2130b57f8bffa7a9"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__68-[PlayerView setLanMas_makeWithImageRate:isOpenVirtual:isUsageMode:]_block_invoke_2"
-                  moduleName = "&#x9690;&#x79c1;&#x4fdd;&#x62a4;"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/xdh/Desktop/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%8F%8C%E5%AD%90%E6%98%9F%E4%BA%91%E6%89%8B%E6%9C%BA/CloudPlayer/View/PlayerView.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "393"
-                  endingLineNumber = "393">
-               </Location>
-            </Locations>
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -357,84 +327,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "CF0791BF-FC70-41D2-BC99-F18BA9DED973"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/AppDelegate/AppDelegate.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "192"
-            endingLineNumber = "192"
-            landmarkName = "-application:openURL:sourceApplication:annotation:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "AF79BE94-8A1B-448B-8B96-A9606CFFC280"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/AppDelegate/AppDelegate.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "171"
-            endingLineNumber = "171"
-            landmarkName = "-applicationWillEnterForeground:"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "AF79BE94-8A1B-448B-8B96-A9606CFFC280 - 288ed43b6bbf323d"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[AppDelegate applicationWillEnterForeground:]"
-                  moduleName = "&#x9690;&#x79c1;&#x4fdd;&#x62a4;"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/xdh/Desktop/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%8F%8C%E5%AD%90%E6%98%9F%E4%BA%91%E6%89%8B%E6%9C%BA/AppDelegate/AppDelegate.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "171"
-                  endingLineNumber = "171">
-               </Location>
-               <Location
-                  uuid = "AF79BE94-8A1B-448B-8B96-A9606CFFC280 - b71c8eff46da8e6d"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__46-[AppDelegate applicationWillEnterForeground:]_block_invoke"
-                  moduleName = "&#x9690;&#x79c1;&#x4fdd;&#x62a4;"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/xdh/Desktop/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%88%9B%E7%BB%B4%E7%9B%92%E5%AD%90/%E5%8F%8C%E5%AD%90%E6%98%9F%E4%BA%91%E6%89%8B%E6%9C%BA/AppDelegate/AppDelegate.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "173"
-                  endingLineNumber = "173">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "4F453F96-CCA2-4869-AC7E-4F1A38C75B78"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/AppDelegate/AppDelegate.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "188"
-            endingLineNumber = "188"
-            landmarkName = "-application:openURL:sourceApplication:annotation:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "81032BF0-603A-4136-8D65-1412DF173FF5"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -507,9 +399,7 @@
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "667"
-            endingLineNumber = "667"
-            landmarkName = "-beginLinkWebSocketFun"
-            landmarkType = "7">
+            endingLineNumber = "667">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
@@ -522,9 +412,9 @@
             filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/AppDelegate/SceneDelegate.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1101"
-            endingLineNumber = "1101"
-            landmarkName = "-forgetPwdDidSetPwdFun:"
+            startingLineNumber = "1103"
+            endingLineNumber = "1103"
+            landmarkName = "-getNASMsgFun"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -576,5 +466,21 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C6892727-C09B-4597-9847-BCA4E19FD699"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/AppDelegate/SceneDelegate.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "344"
+            endingLineNumber = "344"
+            landmarkName = "-queryWebRtcMsgFun"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 4 - 4
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -108,12 +108,12 @@ isBangsScreen; \
 //弃用 #define shareService   @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //创维盒子 测试地址 正在使用
-//#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
-//#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
+#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
+#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //预生产环境
-#define CloudService   @"http://testprivacy.phone.androidscloud.com:10900"
-#define shareService   @"http://testprivacy.phone.androidscloud.com:10900/h5/#/pages/fileSharing/index?productType=Private-X&token="
+//#define CloudService   @"http://testprivacy.phone.androidscloud.com:10900"
+//#define shareService   @"http://testprivacy.phone.androidscloud.com:10900/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 //生产环境 弃用
 //弃用 #define CloudService   @"http://hiboxde.armclouding.com:7780"

+ 2 - 0
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -50,6 +50,7 @@
 #import "videoPlayByAVPlayerViewController.h"
 #import "pingManager.h"
 #import "webRtcPlayerViewController.h"
+#import "webRtcPingManager.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate,UITabBarControllerDelegate>
 @property(nonatomic, strong)   CalculatorViewController *calculatorVC;
@@ -345,6 +346,7 @@
         if(curModel && curModel.status == 0){
             ksharedAppDelegate.DeviceWebRtcMsgMod = curModel;
             [[webRtcManager shareManager] beginToLinkWebRtcFun];
+            [[webRtcPingManager shareManager] startPingFun];
         }
         else
         {

+ 3 - 1
创维盒子/双子星云手机/netWork/newWorkInterface.h

@@ -140,10 +140,12 @@
 #define updatePCLoginStateFun  @"/box/login/updateStatus"
 
 /*21 webrtc客户端查询唯一标识接口  POST请求
+ 1.4.4 需求更改 返回的 链接是数组类型 客户端ping后看哪个延时短 选哪个用
 输入参数
  
  返回数据模型 */
-#define webrctQueryByClient  @"/box/webrtc/identifier/queryByClient"
+//#define webrctQueryByClient  @"/box/webrtc/identifier/queryByClient"
+#define webrctQueryByClient  @"/box/webrtc/identifier/queryByClient2"
 
 /*22 webrtc 链接打洞是否成功  POST请求
 输入参数

+ 14 - 0
创维盒子/双子星云手机/webRtc/model/webRtcMsgModel.h

@@ -12,12 +12,21 @@ NS_ASSUME_NONNULL_BEGIN
 @interface webRtcMsgSignallingModel : SuperModel //信令服务对象 (推流)
 @property (nonatomic, copy) NSString *port;//端口
 @property (nonatomic, copy) NSString *domainName;//地址
+@property (nonatomic, copy) NSString *ip;//需要用的ip
+@property (nonatomic, copy) NSString *room;//未用到
 @end
+
 @interface webRtcMsgTurnModel : SuperModel //turn服务对象 (ice)
 @property (nonatomic, copy) NSString *port;//端口
 @property (nonatomic, copy) NSString *domainName;//地址
+@property (nonatomic, copy) NSString *ip;//需要用的ip
+@property (nonatomic, copy) NSString *room;//未用到
+
+@property (nonatomic, assign) NSInteger delayedms;// ping的延时毫秒数
+
 @end
 
+@protocol webRtcMsgTurnModel;
 @interface webRtcMsgDataModel : SuperModel
 
 @property (nonatomic, copy) NSString *sn;//SN
@@ -25,6 +34,11 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString *cpuSerialNum;//CPU 序列号
 @property(nonatomic, strong) webRtcMsgSignallingModel*signalling;
 @property(nonatomic, strong) webRtcMsgTurnModel*turn;
+
+@property (nonatomic, strong) NSArray<webRtcMsgTurnModel>* turnList;
+
+//自定义字段
+@property (nonatomic, assign) BOOL isPingDoneType;// 是否ping完成 所有IP
 @end
  
 @interface webRtcMsgModel : SuperModel

+ 23 - 0
创维盒子/双子星云手机/webRtc/webRtcPingManager/webRtcPingManager.h

@@ -0,0 +1,23 @@
+//
+//  webRtcPingManager.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/12/24.
+//
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface webRtcPingManager : NSObject
+/** 实例化对象(单例) */
++ (instancetype)shareManager;
+
+/**自定义字段 是否为局域网*/
+@property (nonatomic,assign) bool isPingOk; //
+
+//开始
+- (void)startPingFun;
+@end
+
+NS_ASSUME_NONNULL_END

+ 102 - 0
创维盒子/双子星云手机/webRtc/webRtcPingManager/webRtcPingManager.m

@@ -0,0 +1,102 @@
+//
+//  webRtcPingManager.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/12/24.
+//
+
+#import "webRtcPingManager.h"
+#import "WHPingTester.h"
+
+@interface webRtcPingManager ()<WHPingDelegate>
+{
+    WHPingTester *whPingTester;
+    NSInteger pingIndex;//开始ping的第x个IP
+}
+@end
+
+@implementation webRtcPingManager
+
++ (instancetype)shareManager {
+    static webRtcPingManager *_instance;
+    static dispatch_once_t onceToken;
+    dispatch_once(&onceToken, ^{
+        _instance = [[self alloc] init];
+    });
+    return _instance;
+}
+
+- (instancetype)init {
+
+    if (self = [super init]) {
+        pingIndex = 0;
+        //[self registeNotification];
+    }
+    return self;
+}
+
+
+#pragma mark ---ping-----站点 判断是否是局域网
+- (void)startPingFun
+{
+    NSArray<webRtcMsgTurnModel>* turnList = ksharedAppDelegate.DeviceWebRtcMsgMod.data.turnList;
+    if (!turnList || turnList.count < pingIndex) {
+        <#statements#>
+    }
+    
+    
+    
+    if (self->whPingTester)
+    {
+        [self->whPingTester stopPing];
+        self->whPingTester = nil;
+    }
+    
+    self->whPingTester = [[WHPingTester alloc] initWithHostName:roomInternetIp];
+    self->whPingTester.delegate = self;
+    //self->whPingTester.countdownTime = 1; //1秒ping一次
+    [self->whPingTester startPing];
+    
+    
+    /// 启动定时器监听 10秒后 whPingTester的状态
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        if(self->whPingTester){
+            [weakSelf didGetPingStateIsOK:NO];
+        }
+    });
+    
+}
+
+#pragma mark ---ping---- 代理回调
+- (void)didPingSucccessWithTime:(float)time withError:(NSError*) error
+{
+    HLog(@"time:%f \n error: %@",time,error)
+    
+    //if(error.code == 111 || time > 1000) //超时或者延时超过100ms,就要记录数据
+    if(error != nil)
+    {
+        [self didGetPingStateIsOK:NO];
+    }
+    else if(time > 0){
+        [self didGetPingStateIsOK:YES];
+        //test code
+        //[self didGetPingStateIsOK:NO];
+    }
+    
+}
+
+- (void)didPingfialewithError:(NSError*)error
+{
+    HLog(@" error  error: %@",error)
+    [self didGetPingStateIsOK:NO];
+}
+
+-(void)didGetPingStateIsOK:(BOOL)isOk
+{
+    self.isPingOk = isOk;
+    [self->whPingTester stopPing];
+    self->whPingTester = nil;
+}
+
+@end