thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ephraim Dan <E....@F5.com>
Subject RE: TSocket::peek() - shouldn't it be non-blocking?
Date Tue, 21 Jul 2009 05:18:33 GMT
That explains it.

Is there a way to get the behavior I want, i.e. to check before reading in order not to block?
 Is there a non-blocking transport layer or do the existing ones support nonblocking sockets?


-----Original Message-----
From: David Reiss [mailto:dreiss@facebook.com] 
Sent: Monday, July 20, 2009 20:32
To: thrift-user@incubator.apache.org
Subject: Re: TSocket::peek() - shouldn't it be non-blocking?

> So I'm still left with the question - isn't peek() supposed to be a nonblocking way to
check if a read would block?  If so, why isn't it working for me, and if not, how do I get
that behavior?

No.  It's a way for the processor to determine if the socket has been closed
before trying to read another request (and complaining that it is incomplete).
It is not supposed to be nonblocking.

Mime
View raw message