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

Re: OpenTransport behaviour under X


  • Subject: Re: OpenTransport behaviour under X
  • From: Aaron Ballman <email@hidden>
  • Date: Mon, 27 Oct 2003 10:38:12 -0600

So how are you handling that? Are you polling OTLook in a thread? The first
time you receive a message that you have T_Data on the line, you can grab
the bits of it with OTRcv until it reports that there is no more data. As
I've said, I'm new at this - but maybe our discussion will prompt a reply
from the seasoned veterens...

You don't need to poll for data in a thread (tho that is certainly one way you can do it). I use OTLook when I want to read something synchronously. The call will tell me whether there is data available to be read. If there isn't data available to be read, then the call to OTRcv will block until there _is_ data, which can be annoying. So basically, I'll do something like this:

OTSnd my data out

while (true) {
if OTLook says there's data then
OTRcv the data
Check to see if I have all the data I expect back
If I have it all, break the while loop
end if

DoSomeUIUpdatingCode
}

This way I can have a responsive UI and still use a sync. socket.

HTH!

~Aaron
--
Handy UNIX Commands:

sudo grep -e "My mind" -H -r /
mv /mnt/fuji /mnt/everest
mv "Ignorance" /dev/null
_______________________________________________
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: 
 >Re: OpenTransport behaviour under X (From: Lyndsey Ferguson <email@hidden>)

  • Prev by Date: Re: OpenTransport behaviour under X
  • Next by Date: New Networking Page
  • Previous by thread: Re: OpenTransport behaviour under X
  • Next by thread: Re: OpenTransport behaviour under X
  • Index(es):
    • Date
    • Thread