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

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

Issue 14864009: Keep track of when a socket has been destroyed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove delete_handle marker. Created 7 years, 5 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 | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/socket.dart
diff --git a/sdk/lib/io/socket.dart b/sdk/lib/io/socket.dart
index 957440e435bfe925727dcbe956cded8c04d6fc6a..e82adc73598f4254bbf4ce197f7784d462b7965e 100644
--- a/sdk/lib/io/socket.dart
+++ b/sdk/lib/io/socket.dart
@@ -257,9 +257,10 @@ abstract class ServerSocket implements Stream<Socket> {
int get port;
/**
- * Closes the socket.
+ * Closes the socket. The returned future completes when the socket
+ * is fully closed and is no longer bound.
*/
- void close();
+ Future close();
}
/**
@@ -300,12 +301,14 @@ class RawSocketEvent {
static const RawSocketEvent READ = const RawSocketEvent._(0);
static const RawSocketEvent WRITE = const RawSocketEvent._(1);
static const RawSocketEvent READ_CLOSED = const RawSocketEvent._(2);
+ static const RawSocketEvent CLOSED = const RawSocketEvent._(3);
const RawSocketEvent._(this._value);
final int _value;
String toString() {
return ['RawSocketEvent:READ',
'RawSocketEvent:WRITE',
- 'RawSocketEvent:READ_CLOSED'][_value];
+ 'RawSocketEvent:READ_CLOSED',
+ 'RawSocketEvent:CLOSED'][_value];
}
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | tests/standalone/io/raw_socket_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698