Re: Asynchronous sockets?
Re: Asynchronous sockets?
- Subject: Re: Asynchronous sockets?
- From: Duane Murphy <email@hidden>
- Date: Wed, 6 Feb 2002 17:00:32 -0800
--- At Wed, 6 Feb 2002 16:25:01 -0800, Douglas Davidson wrote:
>
On Wednesday, February 6, 2002, at 04:08 PM, Tomas Zahradnicky, Jr.
>
wrote:
>
>
>> If there is an archive for this list, you could look up the CFSocket
>
>> example I posted on Monday.
>
>
>
> doug,
>
>
>
> i've seen this, but I have to support one nasty thing called wintel so
>
> I had to choose bsd sockets. of course, using CFNetwork/CFSocket would
>
> be quite easy. the host app is multithreaded, but during plug-in run it
>
> is completely dead and waits for plug-in. to not have 2 different codes
>
> for both mac and wintel I had to choose bsd sockets :/
>
>
Well, it's not really my job to support Wintel, but the basic strategy
>
used by CFSocket is one that could work there as well, and as it happens
>
CFSocket itself is (a) in Darwin and (b) pretty close to being
>
platform-independent...
Which Darwin project would we find it in? I'd love to take a look.
--- At Wed, 6 Feb 2002 16:45:40 -0800, Douglas Davidson wrote:
>
On Wednesday, February 6, 2002, at 04:34 PM, Duane Murphy wrote:
>
>
> This sounds like a possibility. We arent in a position to use a run loop
>
> for this particular application, but the implementation is helpful. I
>
> guess you have to make the select() thread so dead simple that killing
>
> it
>
> wont cause any problems. (I tend to think in terms of C++ and killing
>
> C++
>
> makes me nervous.)
>
>
No, the select() thread never goes away, although the set of sockets
>
that it selects on may change as CFSockets are added to and removed from
>
run loops. Killing threads is just asking for trouble.
Does this mean that the CFSocket thread is system wide or just per
application? What does CFSocket do when it has no run loops? I suppose it
goes to sleep. I suppose that all of this is probably in the sources?
(Now you got me thinking... :-)
...Duane
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.