ObjFW  Diff

Differences From Artifact [c6a81ba86b]:

To Artifact [4b4df1c5de]:


552
553
554
555
556
557
558
559


560
561
562
563
564
565
566
552
553
554
555
556
557
558

559
560
561
562
563
564
565
566
567







-
+
+







		ret = false;
	}

	return ret;
}

- (OFData *)stream: (OF_KINDOF(OFStream *))stream
      didWriteData: (OFData *)data
    didWriteString: (OFString *)string
	  encoding: (of_string_encoding_t)encoding
      bytesWritten: (size_t)bytesWritten
	 exception: (id)exception
{
	if (exception != nil) {
		if ([exception isKindOfClass: [OFWriteFailedException class]] &&
		    ([exception errNo] == ECONNRESET ||
		    [exception errNo] == EPIPE)) {
603
604
605
606
607
608
609
610

611
612
613
614
615
616
617
618
619
620
621
622
604
605
606
607
608
609
610

611





612
613
614
615
616
617
618







-
+
-
-
-
-
-







	 * send it all at once.
	 *
	 * We do not use the socket's write buffer in case we need to resend
	 * the entire request (e.g. in case a keep-alive connection timed out).
	 */

	@try {
		OFString *requestString = constructRequestString(_request);
		[sock asyncWriteString: constructRequestString(_request)];
		OFData *requestData = [OFData
		    dataWithItems: [requestString UTF8String]
			    count: [requestString UTF8StringLength]];

		[sock asyncWriteData: requestData];
	} @catch (id e) {
		[self raiseException: e];
		return;
	}
}

-     (void)socket: (OF_KINDOF(OFTCPSocket *))sock