Re: Using a GCD Client ( was Re: Trouble getting SSD Project working & Questions )
Re: Using a GCD Client ( was Re: Trouble getting SSD Project working & Questions )
- Subject: Re: Using a GCD Client ( was Re: Trouble getting SSD Project working & Questions )
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Wed, 27 Jul 2011 08:34:10 +0100
On 27 Jul 2011, at 01:59, Eric Gorr wrote:
> I have a handler on DISPATCH_SOURCE_TYPE_READ and the handler block is
> getting called. However, the 'accept' call is setting errno to
> 22...invalid parameter.
You're calling accept() in your client? That's very strange, and unlikely to yield useful results. The client call sequence is typically socket(), connect(), write(), read(), close(). This doesn't change when you switch from TCP to UNIX domain sockets.
Some suggestions:
o BetterAuthorizationSample shows the basics of implementing a non-GCD client.
<http://developer.apple.com/library/mac/samplecode/BetterAuthorizationSample/index.html>
o If you want to implement connect() in a GCD style, check out my recent post to DevForums on that subject.
<https://devforums.apple.com/message/488837#488837>
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden