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

Issue 11338037: Start reading data from sockets directly into external byte arrays (Closed)

Created:
8 years, 1 month ago by Søren Gjesse
Modified:
8 years, 1 month ago
Reviewers:
Mads Ager (google), ajhonsen
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Start reading data from sockets directly into external byte arrays This adds a new read function to Dart sockets which delivers data in a system allocated buffer. For now just use that for socket input streams. The IOBuffer class does not do much at the moment, but the idea of adding it is to be able to centralize the management of the IO buffers. One thing I am considering here is to keep a cache of free buffers which can be reused without freeing and re-allocating. R=ager@google.com, ajhonsen@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=14321

Patch Set 1 #

Total comments: 3

Patch Set 2 : Addressed review comments from ager@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -33 lines) Patch
M lib/io/socket.dart View 1 1 chunk +9 lines, -0 lines 0 comments Download
M lib/io/socket_stream_impl.dart View 1 chunk +1 line, -24 lines 0 comments Download
M runtime/bin/builtin_impl_sources.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
A + runtime/bin/io_buffer.h View 1 chunk +8 lines, -9 lines 0 comments Download
A runtime/bin/io_buffer.cc View 1 chunk +26 lines, -0 lines 0 comments Download
M runtime/bin/socket.cc View 2 chunks +47 lines, -0 lines 0 comments Download
M runtime/bin/socket_patch.dart View 1 chunk +14 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Gjesse
8 years, 1 month ago (2012-10-30 15:34:20 UTC) #1
Mads Ager (google)
LGTM! https://codereview.chromium.org/11338037/diff/1/lib/io/socket.dart File lib/io/socket.dart (right): https://codereview.chromium.org/11338037/diff/1/lib/io/socket.dart#newcode53 lib/io/socket.dart:53: * available for immediate reading. If no data ...
8 years, 1 month ago (2012-10-31 07:06:22 UTC) #2
Søren Gjesse
8 years, 1 month ago (2012-10-31 09:54:44 UTC) #3
https://codereview.chromium.org/11338037/diff/1/lib/io/socket.dart
File lib/io/socket.dart (right):

https://codereview.chromium.org/11338037/diff/1/lib/io/socket.dart#newcode53
lib/io/socket.dart:53: * available for immediate reading. If no data is
available the
On 2012/10/31 07:06:22, Mads Ager wrote:
> available the -> available

Done.

Powered by Google App Engine
This is Rietveld 408576698