BLIP/BLIPWriter.h
author Jens Alfke <jens@mooseyard.com>
Fri May 30 13:54:38 2008 -0700 (2008-05-30)
changeset 9 980beba83fb7
child 11 29e8b03c05d4
permissions -rw-r--r--
Fixed a serious bug - a race condition where a data buffer in the writer's queue could be dealloced (not the NSData, but its bytes themselves) before the writer sent it, resulting in an EFAULT error.
jens@0
     1
//
jens@0
     2
//  BLIPFrameWriter.h
jens@0
     3
//  MYNetwork
jens@0
     4
//
jens@0
     5
//  Created by Jens Alfke on 5/18/08.
jens@0
     6
//  Copyright 2008 Jens Alfke. All rights reserved.
jens@0
     7
//
jens@0
     8
jens@0
     9
#import "TCPWriter.h"
jens@0
    10
@class BLIPRequest, BLIPResponse, BLIPMessage;
jens@0
    11
jens@0
    12
jens@0
    13
@interface BLIPWriter : TCPWriter
jens@0
    14
{
jens@0
    15
    NSMutableArray *_outBox;
jens@0
    16
    UInt32 _numQueriesSent;
jens@0
    17
}
jens@0
    18
jens@0
    19
- (BOOL) sendRequest: (BLIPRequest*)request response: (BLIPResponse*)response;
jens@0
    20
- (BOOL) sendMessage: (BLIPMessage*)message;
jens@0
    21
jens@0
    22
@property (readonly) UInt32 numQueriesSent;
jens@0
    23
jens@0
    24
@end