ObjFW  Diff

Differences From Artifact [851d26fee8]:

To Artifact [e488747830]:


24
25
26
27
28
29
30

31
32
33
34
35
36
37
#ifdef OF_HAVE_THREADS
# import "OFThread.h"
#endif
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"

#import "OFBindFailedException.h"

#import "OFInvalidArgumentException.h"
#import "OFNotConnectedException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"







>







24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifdef OF_HAVE_THREADS
# import "OFThread.h"
#endif
#import "OFRunLoop.h"
#import "OFRunLoop+Private.h"

#import "OFBindFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFNotConnectedException.h"
#import "OFReadFailedException.h"
#import "OFWriteFailedException.h"

#import "autorelease.h"
#import "macros.h"
272
273
274
275
276
277
278










279
280
281
282
283
284
285
		@throw [OFInvalidArgumentException exception];
	}

	return hash;
}

@implementation OFUDPSocket










+ (instancetype)socket
{
	return [[[self alloc] init] autorelease];
}

+ (void)resolveAddressForHost: (OFString*)host
			 port: (uint16_t)port







>
>
>
>
>
>
>
>
>
>







273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
		@throw [OFInvalidArgumentException exception];
	}

	return hash;
}

@implementation OFUDPSocket
+ (void)initialize
{
	if (self != [OFUDPSocket class])
		return;

	if (!of_init_sockets())
		@throw [OFInitializationFailedException
		    exceptionWithClass: self];
}

+ (instancetype)socket
{
	return [[[self alloc] init] autorelease];
}

+ (void)resolveAddressForHost: (OFString*)host
			 port: (uint16_t)port