Authored by 盖剑秋

优化socket。:

... ... @@ -129,6 +129,11 @@
if (_socketService == nil) {
_socketService = [[YH_SocketService alloc]init];
_socketService.delegate = self;
_socketService.barrageViewController = self.barrageViewController;
}
if (_socketService && _socketService.barrageViewController == nil) {
_socketService.barrageViewController = self.barrageViewController;
}
return _socketService;
... ... @@ -383,8 +388,10 @@
dispatch_async(dispatch_get_main_queue(), ^{
if (EvtID == PUSH_ERR_NET_DISCONNECT) {
[self startRtmp];//不停的重试,只要在用户点击结束之前,都要进行重新连接操作。
// [self liveButtonPressed:_liveButton];
DLog(@"已经连接三次了");
dispatch_async(dispatch_get_main_queue(), ^{
;
});
}
long long time = [(NSNumber*)[dict valueForKey:EVT_TIME] longLongValue];
int mil = time % 1000;
... ... @@ -1187,7 +1194,6 @@
[self.view addSubview:self.barrageViewController.view];
// self.barrageViewController.view.left = SCREEN_WIDTH;
// self.barrageViewController.view.backgroundColor = [UIColor redColor];
self.socketService.barrageViewController = self.barrageViewController;
}
/**
... ...