We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f0c457 commit 89dc739Copy full SHA for 89dc739
1 file changed
ObjC/ObjCDemo/main.m
@@ -27,6 +27,7 @@
27
//
28
29
#import <Foundation/Foundation.h>
30
+#include <unistd.h>
31
#import "NWStreamBuffer.h"
32
#import "NWSSEParser.h"
33
#import "NWReadRequest.h"
@@ -655,7 +656,8 @@ static void demoServerSocket(void) {
655
656
657
GCDAsyncSocket *udsServer = [[GCDAsyncSocket alloc] initWithDelegate:delegate
658
delegateQueue:queue];
- NSString *tmpPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"nwasyncsocket_demo.sock"];
659
+ NSString *tmpPath = [NSTemporaryDirectory() stringByAppendingPathComponent:
660
+ [NSString stringWithFormat:@"nwasyncsocket_demo_%d.sock", getpid()]];
661
NSURL *sockURL = [NSURL fileURLWithPath:tmpPath];
662
NSError *udsErr = nil;
663
BOOL udsOk = [udsServer acceptOnUrl:sockURL error:&udsErr];
0 commit comments