ISessionInputBuffer.IsDataAvailable(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether input data is available, waiting if necessary.
[Android.Runtime.Register("isDataAvailable", "(I)Z", "GetIsDataAvailable_IHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool IsDataAvailable(int timeout);
[<Android.Runtime.Register("isDataAvailable", "(I)Z", "GetIsDataAvailable_IHandler:Org.Apache.Http.IO.ISessionInputBufferInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member IsDataAvailable : int -> bool
Parameters
- timeout
- Int32
The read timeout, in milliseconds, used when the socket buffer has no data. Zero means no timeout.
Returns
true if data is available; otherwise, false.
- Attributes
Exceptions
An I/O error occurs while checking for input data.
Remarks
The socket implementation returns immediately if data is already buffered. Otherwise, it attempts to read with the specified timeout and restores the previous socket timeout afterward. A timeout or the end of the stream can both produce false; this result does not by itself establish whether the connection is closed.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.