From: | Jesse McClusky |
Date: | 15 Aug 2000 at 02:21:29 |
Subject: | Re: AMIOPEN: Which is better: Message Ports or TCP Sockets? |
> From: "Daniel Robbins" <drobbins@gentoo.org>
>> On Mon, Aug 14, 2000 at 07:45:24PM -0400, Douglas McLaughlin wrote:
> > Hi all,
> >
> > On the new 'DE', which is the best method to pass data between tasks,
> > message ports or TCP sockets? Which would be the most compatible with
> > classic Amiga methods?
>
> You're going to have way more overhead with TCP sockets. I think that
> using kernel-based IPC (like message ports) is definitely the way to
> go. Besides, since you are going to be passing data between
> processes, they are going to be on the same machine (probably), so
> there's no need for TCP. You may also want to consider using threads,
> and just have them access the same data structures.
Yup. There's also another way to go, that being events.
But generally the mailbox setup will do. Remember, if
you do share structures though to use mutexes. Practice
safe sharing. (: Oh, and use allocdef not allocdata for
data areas shared between threads, or it's guaranteed
to break sooner or later.
Jesse
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html