解决办法
- 进入后台时将udpsocket关闭
-(void)applicationDidEnterBackground:(UIApplication *)application {
// 关闭UDP连接
}
- 再次进入前台时,打开udpsocket
-(void)applicationWillEnterForeground:(UIApplication *)application{
//开启UDP连接
}
-(void)applicationDidEnterBackground:(UIApplication *)application {
// 关闭UDP连接
}
-(void)applicationWillEnterForeground:(UIApplication *)application{
//开启UDP连接
}