ISessionInputBufferExtensions.ReadLineAsync 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.
Overloads
| Name | Description |
|---|---|
| ReadLineAsync(ISessionInputBuffer) |
Runs a blocking line read on a thread-pool thread. |
| ReadLineAsync(ISessionInputBuffer, CharArrayBuffer) |
Runs a blocking line read into a character buffer on a thread-pool thread. |
ReadLineAsync(ISessionInputBuffer)
Runs a blocking line read on a thread-pool thread.
public static System.Threading.Tasks.Task<string?> ReadLineAsync(this Org.Apache.Http.IO.ISessionInputBuffer self);
static member ReadLineAsync : Org.Apache.Http.IO.ISessionInputBuffer -> System.Threading.Tasks.Task<string>
Parameters
- self
- ISessionInputBuffer
The session input buffer from which to read.
Returns
A task whose result is the line without its CR and LF terminators, or null if the end of the stream is reached before any line data is read.
Remarks
This method calls ReadLine().
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.
Applies to
ReadLineAsync(ISessionInputBuffer, CharArrayBuffer)
Runs a blocking line read into a character buffer on a thread-pool thread.
public static System.Threading.Tasks.Task<int> ReadLineAsync(this Org.Apache.Http.IO.ISessionInputBuffer self, Org.Apache.Http.Util.CharArrayBuffer? buffer);
static member ReadLineAsync : Org.Apache.Http.IO.ISessionInputBuffer * Org.Apache.Http.Util.CharArrayBuffer -> System.Threading.Tasks.Task<int>
Parameters
- self
- ISessionInputBuffer
The session input buffer from which to read.
- buffer
- CharArrayBuffer
The character buffer to which the line is appended, without its CR and LF terminators.
Returns
A task whose result is the line length reported by the buffer, excluding CR and LF, or -1 if the end of the stream is reached before any line data is read.
Remarks
This method calls ReadLine(CharArrayBuffer). The Android implementation reports encoded bytes, which can differ from the number of decoded characters. Existing characters in buffer are retained. Keep the buffer available for the read until the task completes.
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.