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

Unified Diff: runtime/bin/socket_patch.dart

Issue 11280162: Add onError to dart:io SecureSocket. Allow onConnect and outputStream to coexist on Socket and Sec… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo. Created 8 years, 1 month 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/secure_socket.cc ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_patch.dart
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index 6e58985baa299a25c133d342812ab0c80bdfa3e3..ec09d6f77f38494cd84fe28061ad3706f1e5a9ca 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -469,10 +469,6 @@ class _Socket extends _SocketBase implements Socket {
throw new StreamException(
"Cannot set connect handler when already connected");
}
- if (_outputStream != null) {
- throw new StreamException(
- "Cannot set connect handler when output stream is used");
- }
_clientConnectHandler = callback;
_updateOutHandler();
}
@@ -507,7 +503,7 @@ class _Socket extends _SocketBase implements Socket {
OutputStream get outputStream {
if (_outputStream == null) {
- if (_handlerMap[_SocketBase._OUT_EVENT] != null) {
+ if (_clientWriteHandler != null) {
throw new StreamException(
"Cannot get output stream when socket handlers are used");
}
« no previous file with comments | « runtime/bin/secure_socket.cc ('k') | sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698