Re: Searching for socket API thread based
Re: Searching for socket API thread based
- Subject: Re: Searching for socket API thread based
- From: AgentM <email@hidden>
- Date: Tue, 7 Feb 2006 09:12:49 -0600
Hi Andrea-
AsyncSocket and NetSocket are already thread-based. [SmallSockets is
not.] They rely on Core Foundation's CFSocket calls to make them seem
asynchronous. In fact, CFSocket spawns a thread (to handle all the
socket connections), blocks, and messages the main thread/runloop
when an event occurs. You too can see the source:
static void *__CFSocketManagerThread = NULL;
from:
http://cvs.opendarwin.org/cgi-bin/cvsweb.cgi/src/CoreFoundation/
RunLoop.subproj/CFSocket.c?rev=1.3&content-type=text/x-cvsweb-markup
Furthermore, there doesn't seem to be reason you couldn't add the
sockets to a runloop in a different thread. If you explain in more
detail what kind of problems you are having, perhaps we can help you
better.
Good luck.
-M
On Feb 7, 2006, at 7:26 AM, Andrea Salomoni wrote:
Hi & thks for answer,
Yes C++ isn't my language indeed....
I'm using small socket and AsyncSocket, but I will modify these
classes in order to make a thread version ....
Thank you all
Andrea
Il giorno 07/feb/06, alle ore 12:58, email@hidden ha scritto:
Does this have to be Cocoa / Objective-C based?
I'm using a nice one in C++ at present called ACE, the only
problem with
it is it's steap learning curve (well, I found it to have one
anyway).
It would fit nicely into a threaded model (and in fact, has loads of
support for just this case). Obviously, your downside is that you'll
need to pull the ACE distribution, compile it for the Mac, and get
the
shared object library into your bundle's Frameworks directory... it's
all 'monkey work', nothing hard really.
Of course, this is just massive-assumption on my part... You might
not
want C++ code in your program. Hmmm, which makes me wonder how
hard it
would be to integrate stuff from F-Script or the Python stuff...
John
-----Original Message-----
From: cocoa-dev-bounces+john.clayton=email@hidden
[mailto:cocoa-dev-bounces+john.clayton=email@hidden] On
Behalf Of Andrea Salomoni
Sent: Dienstag, 7. Februar 2006 12:08
To: email@hidden
Subject: Searching for socket API thread based
Hi,
I'm trying a lot of different socket classes, but all NSRunLoop
based.
I don't like this solution, because I need a thread based and without
exception system socket.
Is there someone able to give me a link?
I thought to use CFNetwork Apple's system, but I think is runLoop
based
too...
Thank you for your kind support
Andrea
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40ubs.com
This email sent to email@hidden
Visit our website at http://www.ubs.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40themactionfaction.com
This email sent to email@hidden
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
AgentM
email@hidden
|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden