添加回调数据的解析过程
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#import "ConnectHotspotModel.h"
|
||||
#import "ResetDeviceModel.h"
|
||||
#import "RestartDeviceModel.h"
|
||||
#import "IFishUDPHelperBackMsgModel.h"
|
||||
|
||||
@interface IFishHotpotUDPHelper ()
|
||||
{
|
||||
@@ -135,10 +136,14 @@
|
||||
|
||||
NSLog(@"didReceiveData%@",result);
|
||||
NSLog(@"port%hu",port);
|
||||
AppDelegate *app =(AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[app.window makeToast:[NSString stringWithFormat:@"收到答复:%@", result]];
|
||||
if ([self.delegate respondsToSelector:@selector(udpHelperCommandExecutedSuccess)]) {
|
||||
[self.delegate udpHelperCommandExecutedSuccess];
|
||||
IFishUDPHelperBackMsgModel *model = [[IFishUDPHelperBackMsgModel alloc] initWithData:data];
|
||||
if ([model.result isEqualToString:@"01"]) {
|
||||
if ([self.delegate respondsToSelector:@selector(udpHelperCommandExecutedSuccess)]) {
|
||||
[self.delegate udpHelperCommandExecutedSuccess];
|
||||
}
|
||||
} else {
|
||||
AppDelegate *app =(AppDelegate*)[UIApplication sharedApplication].delegate;
|
||||
[app.window makeToast:[NSString stringWithFormat:@"收到答复:%@", result]];
|
||||
}
|
||||
[self.loopTimer invalidate];
|
||||
return YES;
|
||||
|
||||
Reference in New Issue
Block a user