// An ever-increasing integer that gives each transaction a unique ID for the
// debugging engine.
- NSUInteger transactionID;
+ NSInteger transactionID;
// The most recently received transaction ID.
- NSUInteger lastReadTransaction_;
+ NSInteger lastReadTransaction_;
// The last transactionID written to the stream.
- NSUInteger lastWrittenTransaction_;
+ NSInteger lastWrittenTransaction_;
// To prevent blocked writing, we enqueue all writes and then wait for the
// write stream to tell us it's ready. We store the pending commands in this
{
// Find the NULL separator, or the end of the string.
NSUInteger partLength = 0;
- for (NSUInteger i = bufferOffset; i < bytesRead && charBuffer[i] != '\0'; ++i, ++partLength) ;
+ for (CFIndex i = bufferOffset; i < bytesRead && charBuffer[i] != '\0'; ++i, ++partLength) ;
// If there is not a current packet, set some state.
if (!self.currentPacket)
NSLog(@"write error");
}
// Incomplete write.
- else if (bytesWritten < strlen(string))
+ else if (bytesWritten < static_cast<CFIndex>(strlen(string)))
{
// Adjust the buffer and wait for another chance to write.
stringLength -= bytesWritten;
@interface NetworkConnection ()
@property (assign) CFReadStreamRef readStream;
-@property NSUInteger lastReadTransaction;
+@property NSInteger lastReadTransaction;
@property (retain) NSMutableString* currentPacket;
@property (assign) CFWriteStreamRef writeStream;
-@property NSUInteger lastWrittenTransaction;
+@property NSInteger lastWrittenTransaction;
@property (retain) NSMutableArray* queuedWrites;
- (void)runNetworkThread;