// Information about the current read loop. We append to |currentPacket_|
// until |currentPacketSize_| has reached |packetSize_|.
NSMutableString* currentPacket_;
- int packetSize_;
- int currentPacketIndex_;
+ NSInteger packetSize_;
+ NSInteger currentPacketIndex_;
// The delegate. All methods are executed on the main thread.
NSObject<NetworkConnectionDelegate>* delegate_;
BOOL done = NO;
char* string = (char*)[command UTF8String];
- int stringLength = strlen(string);
+ size_t stringLength = strlen(string);
// Busy wait while writing. BAADD. Should background this operation.
while (!done)
if (CFWriteStreamCanAcceptBytes(writeStream_))
{
// Include the NULL byte in the string when we write.
- int bytesWritten = CFWriteStreamWrite(writeStream_, (UInt8*)string, stringLength + 1);
+ CFIndex bytesWritten = CFWriteStreamWrite(writeStream_, (UInt8*)string, stringLength + 1);
if (bytesWritten < 0)
{
NSLog(@"write error");