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

Unified Diff: runtime/bin/stdio_patch.dart

Issue 11773041: Add function for finding what a InputStream or OutputStream is attached to (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « runtime/bin/socket_win.cc ('k') | sdk/lib/io/stdio.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/stdio_patch.dart
diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart
index 5dd5d87c2a8e4c1111c911a078f41ea4e65cc371..9ec2d52906982903fb63bf9ccbf3a6bdf84ff635 100644
--- a/runtime/bin/stdio_patch.dart
+++ b/runtime/bin/stdio_patch.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -35,7 +35,13 @@ patch class _StdIOUtils {
throw new FileIOException("Unsupported stdin type");
}
}
+
+ static int _socketType(Socket socket) {
+ return _getSocketType(socket);
+ }
}
+
_getStdioHandle(Socket socket, int num) native "Socket_GetStdioHandle";
-_getStdioHandleType(int num) native "File_GetStdioHandleType";
+_getStdioHandleType(int num) native "File_GetStdioHandleType";
+_getSocketType(Socket socket) native "Socket_GetType";
« no previous file with comments | « runtime/bin/socket_win.cc ('k') | sdk/lib/io/stdio.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698