ObjOpenSSL  Diff

Differences From Artifact [5efba47a1d]:

To Artifact [8f42d0a3cf]:


215
216
217
218
219
220
221
222
223


224
225
226
227
228
229
230
231
232
233
215
216
217
218
219
220
221


222
223
224


225
226
227
228
229
230
231







-
-
+
+

-
-








	if (ret == 0)
		isAtEndOfStream = YES;

	return ret;
}

- (size_t)_writeNBytes: (size_t)length
	    fromBuffer: (const char*)buffer
- (void)_writeNBytes: (size_t)length
	  fromBuffer: (const char*)buffer
{
	ssize_t ret;

	if (length > INT_MAX)
		@throw [OFOutOfRangeException newWithClass: isa];

	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa
						      socket: self];

243
244
245
246
247
248
249
250

251
252
253
254
255
256
257
258
259
260
261
262
241
242
243
244
245
246
247

248
249
250
251


252
253
254
255
256
257
258







-
+



-
-







#else
		e->errNo = WSAENOTCONN;
#endif

		@throw e;
	}

	if ((ret = SSL_write(ssl, buffer, (int)length)) < 1)
	if (SSL_write(ssl, buffer, (int)length) < 1)
		@throw [OFWriteFailedException newWithClass: isa
						     stream: self
					    requestedLength: length];

	return ret;
}

- (size_t)pendingBytes
{
	return [super pendingBytes] + SSL_pending(ssl);
}