|
From: | Marcus Müller |
Subject: | Re: "Modern" server socket programming? |
Date: | Wed, 9 Jan 2013 16:47:09 +0100 |
Hi Stefan,
the obvious (and probably biggest) thing missing is ARC support. As I already mentioned this poses a problem in ARC-ready code which drags in corebase headers via other classes. It obviously doesn't matter if you compile these other classes with -fno-arc, as the header inclusion alone is the whole problem (and sometimes pretty hard to avoid, as you can't always forward-declare or mask required structs). The next problem I encountered was missing functionality in CFSocket, specifically CFSocketEnableCallBacks/CFSocketDisableCallBacks. This is probably not too hard to implement. The real showstopper is missing ARC support. Yes, definitely. I was really surprised to see so much being implemented, I didn't really expect that. ;-)
I just revisited the issue and have to correct myself. It seems that GSAvahiNetService doesn't properly retain the name given to it via -[NSNetService initWithDomain:type:name:port:]. I just had a brief look at the code and saw nothing suspicious, but the following code will demonstrate the issue: NSString *name = [[NSUserDefaults standardUserDefaults] stringForKey:@"ServiceName"]; if (!name) name = CFUUIDCreateString(kCFAllocatorDefault, CFUUIDCreate(kCFAllocatorDefault)); NSNetService *service = [[NSNetService alloc] initWithDomain:@"" type:@"_test-service._tcp." name:name port:12345]; [service publish]; This happens when _not_ passing any argument to the test program: 2013-01-09 16:23:03.156 TestService[45728] service:fdfee732-1df0-40da-95a0-f3c57f4fe760 type:_test-service._tcp. port:12345 Assertion failed: (name), function avahi_entry_group_add_service_strlst, file entrygroup.c, line 422. Abort trap: 6 (core dumped) If you provide -ServiceName fdfee732-1df0-40da-95a0-f3c57f4fe760 as command line argument, the assertion doesn't happen. Cheers, Marcus -- Marcus Müller . . . http://www.mulle-kybernetik.com/znek/ |
smime.p7s
Description: S/MIME cryptographic signature
[Prev in Thread] | Current Thread | [Next in Thread] |