ObjXMPP  Diff

Differences From Artifact [0bbbbace48]:

To Artifact [e2f332ead2]:


291
292
293
294
295
296
297
298
299


300
301
302

303
304
305
306
307
308
309
310

311
312
313
314
315
316
317
318
319

320
321
322
323
324
325
326
291
292
293
294
295
296
297


298
299
300
301

302
303
304
305
306
307
308
309

310
311
312
313
314
315
316
317
318

319
320
321
322
323
324
325
326







-
-
+
+


-
+







-
+








-
+







}

- (void)handleConnection
{
	char buffer[512];

	for (;;) {
		size_t length = [sock readNBytes: 512
				      intoBuffer: buffer];
		size_t length = [sock readIntoBuffer: buffer
					      length: 512];

		[self parseBuffer: buffer
		       withLength: length];
			   length: length];

		if (length < 1)
			return;
	}
}

- (void)parseBuffer: (const char*)buffer
	 withLength: (size_t)length
	     length: (size_t)length
{
	if (length < 1) {
		[delegates broadcastSelector: @selector(connectionWasClosed:)
				  withObject: self];
		return;
	}

	[parser parseBuffer: buffer
		 withLength: length];
		     length: length];

	[oldParser release];
	[oldElementBuilder release];

	oldParser = nil;
	oldElementBuilder = nil;
}