UI修改读取定时
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
#pragma mark soket错误断开
|
||||
|
||||
-(void)onSocket:(AsyncSocket *)sock willDisconnectWithError:(NSError *)err{
|
||||
NSLog(@"soket错误断开");
|
||||
NSLog(@"soket错误断开:%@",err);
|
||||
NSLog(@"存留数据%@",[sock unreadData]);
|
||||
if (self.communiteDelegate&&[self.communiteDelegate respondsToSelector:@selector(ifishSocket:willDisconnectWithError:)]) {
|
||||
[self.communiteDelegate ifishSocket:sock willDisconnectWithError:err];
|
||||
@@ -135,7 +135,7 @@
|
||||
[self.communiteDelegate ifishSocket:sock ifishSocketdidConnectToHost:host port:port];
|
||||
}
|
||||
|
||||
NSLog(@"comm已经与服务器建立连接%d macAddress%@", self.clientSocket.isConnected,self.macAddress);
|
||||
NSLog(@"服务器建立连接%d macAddress%@", self.clientSocket.isConnected,self.macAddress);
|
||||
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
NSString*string1=[dataContorl dataToHexString:data];
|
||||
NSString*string2=[string1 substringWithRange:NSMakeRange(30, 2)];
|
||||
if ([string2 isEqualToString:@"01"]&&string1.length==52) {
|
||||
NSLog(@"app登录成功");
|
||||
|
||||
// 查询
|
||||
|
||||
// AppDelegate*delegate=[[UIApplication sharedApplication]delegate];
|
||||
@@ -180,6 +180,7 @@
|
||||
|
||||
[self getDeviceInfo];
|
||||
if (self.communiteDelegate) {
|
||||
NSLog(@"登录");
|
||||
[self.communiteDelegate ifishDeviceLogInSuccees];
|
||||
}
|
||||
|
||||
@@ -190,6 +191,7 @@
|
||||
// [delegate.window makeToast:@"设备已离线"];
|
||||
|
||||
if (self.communiteDelegate) {
|
||||
NSLog(@"离线");
|
||||
[self.communiteDelegate ifishDeviceLogInFail];
|
||||
}
|
||||
|
||||
@@ -203,7 +205,7 @@
|
||||
|
||||
}
|
||||
|
||||
NSLog(@"登陆成功后收到服务器的回执--->%@",data);
|
||||
NSLog(@"readData--->%@",data);
|
||||
|
||||
}
|
||||
|
||||
@@ -252,7 +254,7 @@
|
||||
-(void)soketWriteData:(NSData *)data{
|
||||
|
||||
[ self.clientSocket writeData:data withTimeout:-1 tag:0];
|
||||
NSLog(@"manulData:%@",data);
|
||||
NSLog(@"sendData:%@",data);
|
||||
|
||||
[self.clientSocket readDataWithTimeout:-1 tag:0];// 会出现接受服务器心跳包粘包问题
|
||||
//[ self.singletonSocket.clientSocket readDataToLength:99 withTimeout:-1 tag:0];// 防止心跳包粘包
|
||||
|
||||
Reference in New Issue
Block a user