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

Unified Diff: lib/io/socket.dart

Issue 11338037: Start reading data from sockets directly into external byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | lib/io/socket_stream_impl.dart » ('j') | lib/io/socket_stream_impl.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/io/socket.dart
diff --git a/lib/io/socket.dart b/lib/io/socket.dart
index 097b8dd2c4a2dc45506275f25b7efe3e9dbf9cec..df2fb70bb83d668573475e8af31b50b92de763d1 100644
--- a/lib/io/socket.dart
+++ b/lib/io/socket.dart
@@ -47,6 +47,15 @@ abstract class Socket {
int available();
/**
+ * Read up to [len] bytes from the socket. This function is
+ * non-blocking and will only return data if data is available. The
+ * number of bytes read can be less then [len] if fewer bytes are
+ * available for immediate reading. If no data is available the
Mads Ager (google) 2012/10/31 07:06:22 available the -> available
Søren Gjesse 2012/10/31 09:54:44 Done.
+ * [null] is returned.
+ */
+ List<int> read([int len]);
+
+ /**
* Reads up to [count] bytes of data from the socket and stores them into
* buffer after buffer offset [offset]. The number of successfully read
* bytes is returned. This function is non-blocking and will only read data
« no previous file with comments | « no previous file | lib/io/socket_stream_impl.dart » ('j') | lib/io/socket_stream_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698