Re: No data from endpoint until it's closed?
Re: No data from endpoint until it's closed?
- Subject: Re: No data from endpoint until it's closed?
- From: Kevin Parichan <email@hidden>
- Date: Thu, 08 Aug 2002 10:31:41 -0700
>
>I'm using synchronous blocking OT endpoints with threads. In OS X, it all
>
>works fine. In OS 9.2.2, OTRcv doesn't return until the other side sends a
>
>disconnect. Then I finally get the data that was sent, followed by the
>
>disconnect. What could be causing this?
>
>
...
>
>
The normal way to get the sockets-like behaviour is to do a
>
sync/blocking OTRcv for 1 byte, and then do a non-blocking receive
>
for the rest.
(it's been awhile, so I could be completely wrong on this.)
You could also call OTCountDataBytes before calling OTRcv, retrieving the
exact number of bytes that you've received. In that case OTRcv shouldn't
block. You'll need to repeatedly do this until you get the entire message
from the sender.
=kp
_______________________________________________
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.