[comp.sys.mac.programmer] Calling AppleTalk async.

sund@tde.lth.se (Lars Sundstr|m) (09/02/90)

There is a warning about using the SelfSend option in AppleTalk
because some programs may not expect to get packets from its own
node. In order to avoid this problem I'm resetting the SelfSend
flag to the old value after my calls to AppleTalk. However,
I'm wondering if there is a problem if my calls are async. It
depends on which of the two statements below that is correct.


1. Sync. calls are executed directly before queued calls so there is
a possibility that the SelfSend flag is temp. set by me when other
programs are calling AppleTalk sync.

2. Sync. calls are executed after the last queued call and everything
will work just fine.


Couldn't find the answer in any of the IMs or TNs. So I'm asking you.

Thank in advance


Lars Sundstrom
Department of Applied Electronics
Lund University
Sweden
 

 

billkatt@mondo.engin.umich.edu (billkatt) (09/03/90)

In article <1990Sep2.141941.5964@lth.se> sund@tde.lth.se (Lars Sundstr|m) writes:
>
>There is a warning about using the SelfSend option in AppleTalk
>because some programs may not expect to get packets from its own
>node. In order to avoid this problem I'm resetting the SelfSend
>flag to the old value after my calls to AppleTalk. However,
>I'm wondering if there is a problem if my calls are async. It
>depends on which of the two statements below that is correct.

Ignore the heck out of that warning.   I always run with SetSelfSend on.
It hasn't caused me any trouble.

=============================================================================
Steve Bollinger                                                    ____/|
909 Church St. Apt C                                               \ o.O|
Ann Arbor, Mi. 48104                                                =(_)=
(313)-662-4073 -home (313)-763-3070 -work                             U     
billkatt@mondo.engin.umich.edu                              -ACK ACK ACK ACK!
                                                              "thhhhppppttt!"

urlichs@smurf.sub.org (Matthias Urlichs) (09/04/90)

In comp.sys.mac.programmer, article <1990Sep2.141941.5964@lth.se>,
  sund@tde.lth.se (Lars Sundstr|m) writes:
< 
< There is a warning about using the SelfSend option in AppleTalk
< because some programs may not expect to get packets from its own
< node. [...]
< 
I'd say don't bother, and leave it on.

< 2. Sync. calls are executed after the last queued call and everything
< will work just fine.
< 
You can only depend on the fact that the driver will start processing your
requests in the order they come in, and that the individual call is finished
when the ioResult of your parameter block becomes <= zero.

You cannot depend on any order in which the calls get executed. (This is a
good thing -- we're talking about networking here. Packets get lost, buses are
busy, some remote machines are faster than others...)

The only difference between sync and async, from the MacOS' point of view,
is that the OS waits for the completion of the call (and that it clears the
ioCompletion parameter). The driver, of course, may take additional shortcuts
when it sees a sync call, like making other sync calls (which are expressly
forbidden if you are doing anything asynchronously).

< Couldn't find the answer in any of the IMs or TNs. So I'm asking you.
< 
This is a problem in most technical documentation -- the authors already know
what they're talking about and take some things for granted.

-- 
Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de
Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49+721+621127(Voice)/621227(PEP)