发送端,不用绑定端口

This commit is contained in:
祝发冬 2023-08-27 22:22:56 +08:00
parent 6075d88f59
commit 8ec73c1dcb
2 changed files with 6 additions and 4 deletions

View File

@ -16101,7 +16101,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 7;
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 = 6;
CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;

View File

@ -138,8 +138,10 @@
_clientUdpSocket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()];
[_clientUdpSocket enableBroadcast:YES error:&error];
}
if (![_clientUdpSocket bindToPort:0 error:&error])
BOOL bind = YES;
// bind =[_clientUdpSocket bindToPort:0 error:&error]
if (!bind)
{
}