Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: sdk/lib/io/buffer_list.dart

Issue 12655003: Buffer the entire http header to one packet, and buffer other data in chunks of 4-16 kb. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/buffer_list.dart
diff --git a/sdk/lib/io/buffer_list.dart b/sdk/lib/io/buffer_list.dart
index a369366b1f0334f79611a19d45e253f376a499c3..97e5e804012b288b45783db5de1c37c57df2405b 100644
--- a/sdk/lib/io/buffer_list.dart
+++ b/sdk/lib/io/buffer_list.dart
@@ -66,7 +66,8 @@ class _BufferList {
* Read [count] bytes from the buffer list. If the number of bytes
* requested is not available null will be returned.
*/
- List<int> readBytes(int count) {
+ List<int> readBytes([int count]) {
+ if (count == null) count = length;
List<int> result;
if (_length == 0 || _length < count) return null;
if (_index == 0 && _buffers.first.length == count) {
« no previous file with comments | « no previous file | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698