From 6075d88f5975b9a97b5b437ea5726bf1216ba4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E5=8F=91=E5=86=AC?= Date: Sun, 27 Aug 2023 21:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=91=E9=94=99=E8=AF=AF=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ifish.xcodeproj/project.pbxproj | 4 ++-- Ifish/airkiss/JMAirKissConnection.m | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index 2d73f1f..2526000 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -16101,7 +16101,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; @@ -16221,7 +16221,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; diff --git a/Ifish/airkiss/JMAirKissConnection.m b/Ifish/airkiss/JMAirKissConnection.m index 3434e34..a0a754c 100644 --- a/Ifish/airkiss/JMAirKissConnection.m +++ b/Ifish/airkiss/JMAirKissConnection.m @@ -52,7 +52,7 @@ _returnRandomNum = 0; _connectionDone = false; // self._parameter = [[ESPTaskParameter alloc]init]; -// +// // // check whether IPv4 and IPv6 is supported // NSString *localInetAddr4 = [ESP_NetUtil getLocalIPv4]; // if (![ESP_NetUtil isIPv4PrivateAddr:localInetAddr4]) { @@ -141,23 +141,29 @@ if (![_clientUdpSocket bindToPort:0 error:&error]) { - return; + } else { - NSLog(@"airkiss socket error= %@",error.description); + } if (![_clientUdpSocket beginReceiving:&error]) { - return; + } else + { + + } + + if(error) { NSLog(@"airkiss socket error= %@",error.description); } } + - (void)setupServerUdpSocket { if (!_serverUdpSocket) { _serverUdpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()]; @@ -168,21 +174,28 @@ if (![_serverUdpSocket bindToPort:kAirKiss_Port error:&error]) { - return; + } else { - NSLog(@"airkiss socket error= %@",error.description); + } if (![_serverUdpSocket beginReceiving:&error]) { - return; + } else { - NSLog(@"airkiss socket error= %@",error.description); + } + if(error) + { + NSLog(@"airkiss socket error= %@",error.description); + + } + + } #pragma mark - Event Response