/// <summary> /// Reads from the stream. /// </summary> /// <param name="timeout">The timeout.</param> /// <returns>Any text read from the stream.</returns> public string Read(TimeSpan timeout) { ByteStreamHandler handler = new ByteStreamHandler(this.ByteStream, this.InternalCancellation); return handler.Read(timeout); }
/// <summary> /// Reads asynchronously from the stream. /// </summary> /// <param name="timeout">The timeout.</param> /// <returns>Any text read from the stream.</returns> public async Task<string> ReadAsync(TimeSpan timeout) { ByteStreamHandler handler = new ByteStreamHandler(this.ByteStream, this.InternalCancellation); return await handler.ReadAsync(timeout); }
/// <summary> /// Reads from the stream. /// </summary> /// <param name="timeout">The timeout.</param> /// <returns>Any text read from the stream.</returns> public string Read(TimeSpan timeout) { ByteStreamHandler handler = new ByteStreamHandler(this.ByteStream); return handler.Read(timeout); }