Receiving T_GODATA while reading data from the endpoint.
Receiving T_GODATA while reading data from the endpoint.
- Subject: Receiving T_GODATA while reading data from the endpoint.
- From: Jens Bauer <email@hidden>
- Date: Mon, 12 Aug 2002 20:13:25 +0200
Hi all,
Looking at Eric Okholm's OTVirtualServer, I see the following in the
ReadData routine in OTVirtualClient.c:
...
if (res == kOTLookErr)
{
res = OTLook(epi->erf);
if (res == T_ORDREL)
return;
if (res == T_GODATA)
{
//
// This isn't expected, but it has happened occasionally.
// The correct way to proceed is to ignore it.
//
continue;
}
else
...
...
Now, his comment about the T_GODATA is not expected, uhm, I think I've
guessed why the T_GODATA happens here.
I'd just like to get it confirmed, because it could affect my
application, if I do not understand this correctly.
My guess is that since Eric sends the 128byte request, and immediately
sends the orderly release, then waits for the data to be received, the
send sometimes finishes *before* the orderly release is invoked.
The T_CONNECT sequence:
...
err = OTRcvConnect(epi->erf, &call);
...
...
SendRequest(epi);
...
...
err = OTSndOrderlyDisconnect(epi->erf);
...
If Open Transport sends the entire request to the endpoint, and we have a
huge delay (say 1 second), it would be ready to send more data, right ?
Allright, we'd receive a T_GODATA, since the endpoint is ready for more data.
But... If the OTSndOrderlyDisconnect is invoked before all the data has
been sent, the T_GODATA would not be needed, therefore suppressed by Open
Transport, since it discovered that we don't want to send any more data
on that endpoint.
(I'd expect that a flag is set, whether or not T_GODATA should be sent to
the notifier, and this flag is cleared when OTSndOrderlyDisconnect is
invoked).
Am I completely wrong in my assumption, or *SHOULD* I actually handle the
T_GODATA during the read, but only if I didn't do a OTSndOrderlyDisconnect ?
Apart from that, it's come to my knowledge that some source code called
StreamNotifier; does anyone know where this is available from ? -Google
gives no results, and I can't seem to find it on Apple's FTP server.
Love,
Jens
--
If you've ever thought "I wish there was an easier way", then the new
iMac is for you. See
http://www.apple.com/
--
Jens Bauer, Faster Software.
-Let's make the World better, shall we ?
_______________________________________________
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.