• 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
Re: Repost: OpenTransport problems under X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Repost: OpenTransport problems under X


  • Subject: Re: Repost: OpenTransport problems under X
  • From: Quinn <email@hidden>
  • Date: Mon, 10 Nov 2003 15:44:39 +0000

At 17:52 +0100 5/11/03, Marc Stibane wrote:
What else can I do after 1c to make OTLook in 2d return T_DATA when new
data arrives?

First up, I strongly recommend that you switch your code to using sockets. You already have working OT code for 9 and working sockets code for Windows. Rather than struggling to get working OT code for X (the end result of which is highly undesirable, involving multiple levels of emulation, that is, app -> sockets abstraction layer -> socket emulation on OT -> OT emulation on sockets -> sockets), it'll be better for all concerned if you go directly to sockets.

If that's just not possible, I recommend that you try to avoid exploring the edge cases in the OT framework implementation. Rather than calling OTLook to poll for data, why not just call OTCountDataBytes? It seems that this is an easy solution that will work on 9 and X. You could even write a simple wrapper to get the behaviour you want.

on MyOTLook(ep)
result = OTLook(ep)
if result == 0 && OTCountDataBytes(ep) > 0 then
result = T_DATA
end if
end MyOTLook

Regarding the various semantic mismatches between the OT API as implemented by native Open Transport on traditional Mac OS and as implemented by the OT compatibility framework on Mac OS X, I'll cover that in a future post to the list.

S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.

References: 
 >Repost: OpenTransport problems under X (From: Marc Stibane <email@hidden>)

  • Prev by Date: Searching for beacon packets with an Airport card
  • Next by Date: Re: kEADDRINUSEErr and OTConnect() confusion...
  • Previous by thread: Re: Repost: OpenTransport problems under X
  • Next by thread: TCP/IP settings question
  • Index(es):
    • Date
    • Thread