• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help: OTLook doesn't return T_DATA
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help: OTLook doesn't return T_DATA


  • Subject: Help: OTLook doesn't return T_DATA
  • From: Marc Stibane <email@hidden>
  • Date: Tue, 28 Oct 2003 20:26:34 +0100

MacOS X 10.2.8, OpenTransport glue (blocking, synchronous).

Maybe you've already read about my problem in the last days. Sorry for
the repost, but I am lost.

1. I send some data with OTSnd to my RIP. The RIP sends back about 40
bytes.
2. I call OTLook for the first time. It returns T_DATA.
3. I call OTRcv to read 6 bytes.
4. I call OTLook again. It returns 0 instead of T_DATA.
There are at least 34 bytes left to be read. Why does OTLook return 0?
Under MacOS 9 it returns T_DATA in this case.

If it were only a few lines to change, then I would just do it. But the
code I have to port has dozens of routines relying on the fact that they
can read just a few bytes and the next routine trying to read can call
OTLook and will get T_DATA.

The documentation says:

http://developer.apple.com/documentation/Carbon/Reference/Open_Transport/
open_transport_ref/function_group_14.html
> If you have not installed a notifier, you may poll for these events using
>the OTLook function. Once you receive a T_DATA or T_EXDATA event, you
>should continue in a loop, calling the OTRcv function until it returns
>with the kOTNoDataErr result.
>
>If the endpoint is in synchronous mode and is blocking, the endpoint waits
>for data if none is currently available. You should avoid calling the
>OTRcv function this way because it might cause processing to hang if no
>data is available.

Is there any chance to get back the MacOS 9 behaviour? Any options I
could change e.g. with OTOptionManagement?

Marc Stibane
Fesh! email@hidden
Kurf|rstenstr. 154 tel +49-30-3990 2690
10785 Berlin, Germany mobil +49-173-6522 422


In a world without walls and fences,
who needs windows and gates?
_______________________________________________
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.

  • Prev by Date: UDP & tftpd strangeness
  • Next by Date: Re: OpenTransport behaviour under X
  • Previous by thread: UDP & tftpd strangeness
  • Next by thread: Re: Help: OTLook doesn't return T_DATA
  • Index(es):
    • Date
    • Thread