Hi All
Hope You Doing Well,
when i am executing this code the len(int) coming < 0.
please let me know the reason please?
NSString *urlStr = [[NSString alloc] initWithString
"website.com"];
NSURL *website = [NSURL URLWithString:urlStr ];
CFReadStreamRef readStream;
CFWriteStreamRef writeStream;
CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)[website host], 4444, &readStream, &writeStream);
iStream = (NSInputStream *)readStream;
oStream = (NSOutputStream *)writeStream;
[iStream open];
[oStream open];
uint8_t buffer[1024];
int len = [iStream read:buffer maxLength:sizeof(buffer)];
}
// len is coming <0 at the time of excution..??
Hope You Doing Well,
when i am executing this code the len(int) coming < 0.
please let me know the reason please?
NSString *urlStr = [[NSString alloc] initWithString
NSURL *website = [NSURL URLWithString:urlStr ];
CFReadStreamRef readStream;
CFWriteStreamRef writeStream;
CFStreamCreatePairWithSocketToHost(NULL, (CFStringRef)[website host], 4444, &readStream, &writeStream);
iStream = (NSInputStream *)readStream;
oStream = (NSOutputStream *)writeStream;
[iStream open];
[oStream open];
uint8_t buffer[1024];
int len = [iStream read:buffer maxLength:sizeof(buffer)];
}
// len is coming <0 at the time of excution..??