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

Unified Diff: runtime/bin/socket_impl.dart

Issue 9589001: Handle closing of HTTP client and server (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 10 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.dart ('k') | tests/standalone/src/io/HttpShutdownTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket_impl.dart
diff --git a/runtime/bin/socket_impl.dart b/runtime/bin/socket_impl.dart
index 965a96e91651def8177a49d682d5a86f995a5e66..364e5b6ac2e851bc85c1f9756fcbef827b3a36c2 100644
--- a/runtime/bin/socket_impl.dart
+++ b/runtime/bin/socket_impl.dart
@@ -39,6 +39,8 @@ class _SocketBase {
_canActivateHandlers = true;
_id = -1;
_EventHandler._start();
+ _hashCode = _nextHashCode;
+ _nextHashCode = (_nextHashCode + 1) & 0xFFFFFFF;
}
// Multiplexes socket events to the socket handlers.
@@ -178,6 +180,8 @@ class _SocketBase {
_EventHandler._sendData(_id, _handler, data);
}
+ int hashCode() => _hashCode;
+
abstract bool _isListenSocket();
abstract bool _isPipe();
@@ -198,6 +202,10 @@ class _SocketBase {
// Holds the port of the socket, null if not known.
int _port;
+
+ // Hash code for the socket. Currently this is just a counter.
+ int _hashCode;
+ static int _nextHashCode = 0;
}
« no previous file with comments | « runtime/bin/socket.dart ('k') | tests/standalone/src/io/HttpShutdownTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698