// // udp_data_class.h // myhome // // Created by user on 12-10-31. // Copyright (c) 2012年 __MyCompanyName__. All rights reserved. // #import #import #import "udp_data_class.h" #import "AsyncUdpSocket.h" #import "sysInfo.h" #define BUFNUM 100 @interface UdpHelper : NSObject @property (nonatomic, retain)AsyncUdpSocket *udp; @property (nonatomic, retain) sysInfo* sysinfo; @property (nonatomic, retain)NSTimer *timer; //发送udp线程 @property BOOL udp_send_tag; @property (nonatomic, retain)NSCondition *udp_send_Condition; @property (nonatomic, retain)NSCondition *udp_open_Condition; @property int udp_send_time; @property (nonatomic, retain)NSMutableArray *udp_datas; @property (nonatomic, retain)udp_data_class *udp_list; @property long udp_last_report_time; @property long udp_last_replay_time; @property BOOL online; - (void)Open; - (void)Resume; - (void)sendDataInMain:(Byte *)rr length:(int)len toHost:(NSString *)host toPort:(int)port; - (void)senddataInThr:(NSData *)data toHost:(NSString *)host toPort:(int)port at:(int)second setTag:(int)tag; - (int)stopSend:(NSString *)host rr6:(int)r6 rr8:(int)r8; - (int)stopSend:(NSString *)host rr6:(int)r6 rr8:(int)r8 Port:(int)port; - (int)ChgSendIp:(NSString *)host rr6:(int)r6 rr8:(int)r8 Port:(int)port; - (int)stopSendDadong; @end