Re: Missing T_GODATA
Re: Missing T_GODATA
- Subject: Re: Missing T_GODATA
- From: "Scott Burgess" <email@hidden>
- Date: Thu, 4 Apr 2002 09:56:44 -0800
I sent an email to this post a while back with
a similar problem.
Originally I thought it was some sort of network
problem.
I had a loop that called OTSnd over and over
until a flow error occurred. It just stopped
after a while.
I think the problem might arise from generating
flow control events within a notifier that is
already handling a flow control event.
My solution was to OTSnd a chunk of data and install
a deferred task that writes again. There hasn't been a
significant performance hit and I seem to be getting
all of my T_GODATAs.
Scott
I'm seeing very similar behavior to that reported by Reto Gdhler on this
list March 21, 2002.
I've got a carbonized app, still using the OT APIs. Mac OS X 10.1.3.
Setting all my endpoints to be asynchronous.
I am sometimes not getting a T_GODATA event in my notifier proc after
getting a kOTFlowErr from an OTSnd. The usual behavior is:
1) I OTSnd till getting kOTFlowErr
2) I get a T_GODATA in my notifier, to which I respond with OTSnd once in
the notifier, then signal the original thread to continue.
3) original thread does OTSnd till getting kOTFlowErr
4) wait forever, never getting another T_GODATA in my notifier
This code has worked fine for some time under Mac OS 9 and earlier.
I've worked around this problem with a technique we use in our Unix sockets
code, which, perhaps unsurprisingly, has an almost identical problem.
Apparently select() does not always give you a write indication when the
write queue drains. So what we do is set a timer to go off in 50 ms and just
try to write again then. This appears to work pretty well under Mac OS X,
too.
BTW, I'm pretty impressed that Mac OS X has faithfully reproduced even the
bugs in other *nix TCP stacks ;-)
Has anybody else (besides Herr Gdhler) seen this behavior? Does this ring a
bell with any Unix folks out there?
Rob Dye
National Instruments
_______________________________________________
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.
_______________________________________________
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.