Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion SocketIOPacket.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ - (id) dataAsJSON

- (NSString *) toString
{
NSMutableArray *encoded = [NSMutableArray arrayWithObject:[self typeAsNumber]];
NSNumber *typeAsNumber = [self typeAsNumber];
NSMutableArray *encoded = [NSMutableArray arrayWithObject:typeAsNumber];

NSString *pIdL = self.pId != nil ? self.pId : @"";

Expand All @@ -88,6 +89,11 @@ - (NSString *) toString
{
pIdL = [pIdL stringByAppendingString:@"+"];
}
} else {
// Engine.IO 1.0 expects payload with the ping packet
if ([typeAsNumber intValue] == 2) {
[encoded addObject:@"probe"];
}
}

// Do not write pid for acknowledgements
Expand Down