Re: OpenTransport behaviour under X
Re: OpenTransport behaviour under X
- Subject: Re: OpenTransport behaviour under X
- From: Marc Stibane <email@hidden>
- Date: Mon, 27 Oct 2003 17:00:22 +0100
>
I thought that OTLook was to poll for data event or to find out what failed
>
in the case of an kOTLookErr and clear the endpoint for more usage.
That's the case if the code is running asynchronous. But my code is
running synchronous.
>
So, as I understand it, you don't have to call OTLook; you can continue to
>
call OTRcv until you have no more data. Correct?
Yes, but then you get blocked if there is no data.
That's what OTLook is used for, find out whether there's data available.
If not, the code wouldn't call OTRcv (which would block).
>
You can check the T_MORE flag parameter to see if there is more data ready
>
to be collected.
True. But not even neccessary in my case, since OTCountDataBytes said 8
bytes and the code just wants to read 4 bytes, one after the other.
Of course I could just fix it and read the whole 4 bytes in one
operation, but said routine is called "sync" and I am pretty sure the
linux server at the other end is also sending that data byte by byte.
Some kind of protocol... The code consists of a state machine which
increments its state whenever one byte is read. I really would like to
not change that (because the same source code is used for Windows and
MacOS 9) and instead find out why OTLook doesn't return T_Data.
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.