Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Support for socket.io 1.0.x #197

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
fix when ack number more than 1 digit
fix when ack number more than 1 digit
  • Loading branch information
hearther committed Oct 26, 2014
commit a0b2252fac5c968c8301d46704502583d8c3e937
5 changes: 3 additions & 2 deletions SocketIO.m
Original file line number Diff line number Diff line change
@@ -701,8 +701,9 @@ - (void) onData:(NSString *)data
control = [[NSNumber numberWithUnsignedChar:[packet.data characterAtIndex:0]] integerValue]
-[[NSNumber numberWithUnsignedChar:'0'] integerValue];
if([packet.data length] > 1){
ack = [[NSNumber numberWithUnsignedChar:[packet.data characterAtIndex:1]] integerValue]
-[[NSNumber numberWithUnsignedChar:'0'] integerValue];
NSRange range = NSMakeRange(1, [packet.data rangeOfString:@"["].location-1);
NSString *ackStr = [packet.data substringWithRange:range];
ack = [ackStr integerValue];
}
//GET ENDPOINT
NSUInteger rendpoint = [packet.data rangeOfString:@"["].location;