如何将数据连续写入流并解析流,直到来自服务器的所有数据都写入 NSOutputstream
NSLog(@"Response %@",[[NSString alloc] initWithData:self.m_cWebData encoding:NSUTF8StringEncoding]);
NSUInteger written = [oStream write:(const uint8_t *)[self.m_cWebData bytes] maxLength:[self.m_cWebData length]];
NSLog(@"Rcvd Data=%d written = %d",[self.m_cWebData length],written);
[self.m_cWebData replaceBytesInRange:NSMakeRange(0,written) withBytes:"" length:0];
NSLog(@"Rcvd Data after Reset =%d ",[self.m_cWebData length]);
而且我也开始解析。但是 Stream:handleEvent 没有被调用用于流事件。如果流未获取总服务器响应数据并且还有更多数据要写入流,如何将数据写入流。如何来处理这个案子。