配网错误输出

This commit is contained in:
祝发冬
2023-08-27 21:56:34 +08:00
parent 78c0096abb
commit 6075d88f59
2 changed files with 23 additions and 10 deletions
+21 -8
View File
@@ -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