27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
-
-
+
+
-
+
|
void *pool = objc_autoreleasePoolPush();
OFString *path;
OFUNIXDatagramSocket *sock;
OFSocketAddress address1, address2;
char buffer[5];
#if defined(OF_HAVE_FILES) && !defined(OF_IOS)
path = [[OFSystemInfo temporaryDirectoryURI]
URIByAppendingPathComponent: [[OFUUID UUID] UUIDString]]
path = [[OFSystemInfo temporaryDirectoryIRI]
IRIByAppendingPathComponent: [[OFUUID UUID] UUIDString]]
.fileSystemRepresentation;
#else
/*
* We can have sockets, including UNIX sockets, while file support is
* disabled.
*
* We also use this code path for iOS, as the temporaryDirectoryURI is
* We also use this code path for iOS, as the temporaryDirectoryIRI is
* too long on the iOS simulator.
*/
path = [OFString stringWithFormat: @"/tmp/%@",
[[OFUUID UUID] UUIDString]];
#endif
TEST(@"+[socket]", (sock = [OFUNIXDatagramSocket socket]))
|