Skip to content

Commit

Permalink
Small tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjpayne committed Mar 30, 2016
1 parent f6f6b34 commit 8887cd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PocketSocket/PSWebSocketDriver.m
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ - (void)writeMessageWithOpCode:(PSWebSocketOpCode)opcode data:(NSData *)data {
uint8_t *headerBytes = header.mutableBytes;

headerBytes[0] |= PSWebSocketFinMask;
// headerBytes[0] |= (ZWPWebSocketRsv2Mask);
// headerBytes[0] |= (ZWPWebSocketRsv3Mask);
// headerBytes[0] |= (PSWebSocketRsv2Mask);
// headerBytes[0] |= (PSWebSocketRsv3Mask);
headerBytes[0] |= (PSWebSocketOpCodeMask & opcode);

// determine payload payload
Expand Down Expand Up @@ -604,6 +604,7 @@ - (NSInteger)readBytes:(void *)bytes maxLength:(NSUInteger)maxLength error:(NSEr

if(!frame->control && _frames.count > 0) {
_initialFrame = [_frames lastObject];
frame->rsv1 = _initialFrame->rsv1;
frame->opcode = _initialFrame->opcode;
frame->buffer = _initialFrame->buffer;
} else {
Expand Down

0 comments on commit 8887cd7

Please sign in to comment.