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 14:50:25 +0100
Since no one answered my question (with the subject "sockets in
Powerplant") I repost it here under a better subject title:
>
News - now it broadcasts (UDP), and gets an answer back.
>
>
Under MacOS X you cannot broadcast to 255.255.255.255.
>
You have to broadcast to your own subnet, in my case to 192.168.102.255.
>
>
OK, so now I find my RIP and therefor its IP address.
>
But then the (TCP) connect times out - no connection. There must be
>
another gotcha in the OpenTransport glue.
Got it.
The code (synchronous, blocking) attempts to read 4 bytes - one after the
other. So it checks with OTLook whether there is data (yes), then asks
how much with OTCountDataBytes (8 bytes), then reads ONE byte with OTRcv,
and then again asks with OTLook whether there is data (no, BUMMER).
This worked under MacOS 9 - it seems under X you have to read the whole
buffer until you can ask again...
Is this the intended behaviour? If so where is it documented?
Do I have to change this read logic (the network code is shared with
MacOS 9 and Windows, and works there, so I would like to not change it if
possible) or is there anything I can do to get OTLook to answer T_Data
when there is still unread data in the buffer?
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.