提示和跳转;
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#import "ResetDeviceModel.h"
|
||||
#import "RestartDeviceModel.h"
|
||||
|
||||
#define K_ReSendTimeInterval 5
|
||||
|
||||
@interface IFishHotpotUDPHelper ()
|
||||
{
|
||||
NSString * _ssidName;
|
||||
@@ -37,11 +39,13 @@
|
||||
- (void)broadCastHotspotConnectCommandWith:(NSString *)ssidName pwd:(NSString *)pwd {
|
||||
_ssidName = ssidName;
|
||||
_pwd = pwd;
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(sendConnectHotspotSoketdata) userInfo:nil repeats:YES];
|
||||
[self postmsg:@"命令已发出"];
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:K_ReSendTimeInterval target:self selector:@selector(sendConnectHotspotSoketdata) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
- (void)broadCastRestCommand {
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(sendRestSocketData) userInfo:nil repeats:YES];
|
||||
[self postmsg:@"命令已发出"];
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:K_ReSendTimeInterval target:self selector:@selector(sendRestSocketData) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
- (void)sendRestSocketData {
|
||||
@@ -70,7 +74,8 @@
|
||||
}
|
||||
|
||||
- (void)broadCastRestartCommand {
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(sendRestartSocketData) userInfo:nil repeats:YES];
|
||||
[self postmsg:@"命令已发出"];
|
||||
self.loopTimer = [NSTimer scheduledTimerWithTimeInterval:K_ReSendTimeInterval target:self selector:@selector(sendRestartSocketData) userInfo:nil repeats:YES];
|
||||
|
||||
}
|
||||
|
||||
@@ -129,12 +134,7 @@
|
||||
|
||||
-(BOOL)onUdpSocket:(AsyncUdpSocket *)sock didReceiveData:(NSData *)data withTag:(long)tag fromHost:(NSString *)host port:(UInt16)port
|
||||
{
|
||||
NSString* result;
|
||||
|
||||
result = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
|
||||
|
||||
NSLog(@"didReceiveData%@",result);
|
||||
NSLog(@"port%hu",port);
|
||||
NSString* result = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
|
||||
IFishUDPHelperBackMsgModel *model = [[IFishUDPHelperBackMsgModel alloc] initWithData:data];
|
||||
if ([model.result isEqualToString:@"01"]) {
|
||||
if ([self.delegate respondsToSelector:@selector(udpHelperCommandExecutedSuccess:)]) {
|
||||
|
||||
Reference in New Issue
Block a user