Skip to content

Commit

Permalink
修正了iOS版核心库的几处代码合并的问题。
Browse files Browse the repository at this point in the history
  • Loading branch information
JackJiang2011 committed Jun 27, 2018
1 parent 760085b commit d9a2c36
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,18 @@ - (void) handleProtocal:(NSData *)originalProtocalJSONData
}
else
{
if([[QoS4SendDaemon sharedInstance] hasRecieved:pFromServer.fp])
if([[QoS4ReciveDaemon sharedInstance] hasRecieved:pFromServer.fp])
{
if([ClientCoreSDK isENABLED_DEBUG])
NSLog(@"【IMCORE】【QoS机制】%@已经存在于发送列表中,这是重复包,通知应用层收到该包罗!", pFromServer.fp);

[[QoS4SendDaemon sharedInstance] addRecieved:pFromServer];
[[QoS4ReciveDaemon sharedInstance] addRecieved:pFromServer];
[self sendRecievedBack:pFromServer];

return;
}

[[QoS4SendDaemon sharedInstance] addRecieved:pFromServer];
[[QoS4ReciveDaemon sharedInstance] addRecieved:pFromServer];
[self sendRecievedBack:pFromServer];
}
}
Expand Down Expand Up @@ -108,7 +108,7 @@ - (void) handleProtocal:(NSData *)originalProtocalJSONData
if([ClientCoreSDK sharedInstance].messageQoSEvent != nil)
[[ClientCoreSDK sharedInstance].messageQoSEvent messagesBeReceived:theFingerPrint];

[[QoS4ReciveDaemon sharedInstance] remove:theFingerPrint];
[[QoS4SendDaemon sharedInstance] remove:theFingerPrint];

break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ - (int) sendImpl_:(NSData *)fullProtocalBytes

- (void) putToQoS:(Protocal *)p
{
if(p.QoS && ![[QoS4ReciveDaemon sharedInstance] exist:p.fp])
[[QoS4ReciveDaemon sharedInstance] put:p];
if(p.QoS && ![[QoS4SendDaemon sharedInstance] exist:p.fp])
[[QoS4SendDaemon sharedInstance] put:p];
}

+ (LocalUDPDataSender *)sharedInstance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#import "Protocal.h"
#import "CompletionDefine.h"

@interface QoS4SendDaemon : NSObject
@interface QoS4ReciveDaemon : NSObject

+ (QoS4SendDaemon *)sharedInstance;
+ (QoS4ReciveDaemon *)sharedInstance;

- (void) startup:(BOOL)immediately;
- (void) stop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
static int MESSAGES_VALID_TIME = 10 * 60 * 1000;


@interface QoS4SendDaemon ()
@interface QoS4ReciveDaemon ()

@property (nonatomic, retain) NSMutableDictionary *recievedMessages;
@property (nonatomic, assign) BOOL running;
Expand All @@ -42,11 +42,11 @@ @interface QoS4SendDaemon ()
@end


@implementation QoS4SendDaemon
@implementation QoS4ReciveDaemon

static QoS4SendDaemon *instance = nil;
static QoS4ReciveDaemon *instance = nil;

+ (QoS4SendDaemon *)sharedInstance
+ (QoS4ReciveDaemon *)sharedInstance
{
if (instance == nil)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#import "Protocal.h"
#import "CompletionDefine.h"

@interface QoS4ReciveDaemon : NSObject
@interface QoS4SendDaemon : NSObject

+ (QoS4ReciveDaemon *)sharedInstance;
+ (QoS4SendDaemon *)sharedInstance;

- (void) startup:(BOOL)immediately;
- (void) stop;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
static int QOS_TRY_COUNT = 2;


@interface QoS4ReciveDaemon ()
@interface QoS4SendDaemon ()

@property (nonatomic, retain) NSMutableDictionary *sentMessages;
@property (nonatomic, retain) NSMutableDictionary *sendMessagesTimestamp;
Expand All @@ -47,11 +47,11 @@ @interface QoS4ReciveDaemon ()
@end


@implementation QoS4ReciveDaemon
@implementation QoS4SendDaemon

static QoS4ReciveDaemon *instance = nil;
static QoS4SendDaemon *instance = nil;

+ (QoS4ReciveDaemon *)sharedInstance
+ (QoS4SendDaemon *)sharedInstance
{
if (instance == nil)
{
Expand Down

0 comments on commit d9a2c36

Please sign in to comment.