ObjFW  Diff

Differences From Artifact [72deb2c0c0]:

To Artifact [e5e2000892]:


280
281
282
283
284
285
286










287
288
289
290
291
292
293
294
295
296
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306







+
+
+
+
+
+
+
+
+
+










		@throw [OFNotConnectedException exceptionWithSocket: self];

	if (sendto(_socket, buffer, length, 0,
	    (struct sockaddr*)&receiver->address, receiver->length) < length)
		@throw [OFWriteFailedException exceptionWithObject: self
						   requestedLength: length];
}

- (int)fileDescriptorForReading
{
	return _socket;
}

- (int)fileDescriptorForWriting
{
	return _socket;
}

- (void)close
{
	if (_socket == INVALID_SOCKET)
		@throw [OFNotConnectedException exceptionWithSocket: self];

	close(_socket);
	_socket = INVALID_SOCKET;
}
@end