socket配网优化
This commit is contained in:
parent
5041412a54
commit
26a52f68df
|
|
@ -31,12 +31,12 @@
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
static IFishHotpotUDPHelper *sharedInstace = nil;
|
||||||
@implementation IFishHotpotUDPHelper
|
@implementation IFishHotpotUDPHelper
|
||||||
|
|
||||||
+ (IFishHotpotUDPHelper *)sharedInstance{
|
+ (IFishHotpotUDPHelper *)sharedInstance{
|
||||||
|
|
||||||
static IFishHotpotUDPHelper *sharedInstace = nil;
|
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
sharedInstace = [[self alloc] init];
|
sharedInstace = [[self alloc] init];
|
||||||
|
|
@ -188,6 +188,7 @@
|
||||||
|
|
||||||
-(void)onUdpSocketDidClose:(AsyncUdpSocket *)sock{
|
-(void)onUdpSocketDidClose:(AsyncUdpSocket *)sock{
|
||||||
[self postmsg:@"连接关闭"];
|
[self postmsg:@"连接关闭"];
|
||||||
|
self.bindok=NO;
|
||||||
if (self.closeBlock) {
|
if (self.closeBlock) {
|
||||||
self.closeBlock();
|
self.closeBlock();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue