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

Issue 14864009: Keep track of when a socket has been destroyed (Closed)

Created:
7 years, 7 months ago by Søren Gjesse
Modified:
6 years, 11 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Keep track of when a socket has been destroyed This adds the event CLOSED to RawSocket and RawServerSocket. This event indicate that the underlying socket is now destroyed. This is used to make Socket.close and ServerSocket.close return a future which is completed when the unserlying socket is destroyed. This can be used to start listening on the same port after closing a server socket. R=ajohnsen@google.com, kustermann@google.com BUG=https://code.google.com/p/dart/issues/detail?id=4155 Committed: https://code.google.com/p/dart/source/detail?r=25213

Patch Set 1 #

Total comments: 3

Patch Set 2 : Rebased to r23389 #

Patch Set 3 : Do not send anything to eventhandler after the close command has been sent #

Patch Set 4 : Rebased to r24251 #

Patch Set 5 : More fixes #

Patch Set 6 : Some Windows fixes #

Patch Set 7 : Fix Windows impl by 1) not waiting for client socket disconnect callbacks 2) close and delete file … #

Patch Set 8 : Rebase #

Patch Set 9 : Patch cleanup. #

Total comments: 20

Patch Set 10 : Review cleanup. #

Patch Set 11 : Review update. #

Patch Set 12 : Use DeleteIfClosed so simplity. #

Total comments: 8

Patch Set 13 : Remove delete_handle marker. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -62 lines) Patch
M pkg/http/test/safe_http_server.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M pkg/scheduled_test/lib/src/scheduled_server/safe_http_server.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M runtime/bin/eventhandler.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/eventhandler_android.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/eventhandler_linux.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/eventhandler_macos.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/eventhandler_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +19 lines, -22 lines 0 comments Download
M runtime/bin/socket_patch.dart View 1 2 3 4 5 6 7 8 9 14 chunks +33 lines, -23 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/safe_http_server.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M sdk/lib/io/http.dart View 1 2 3 4 5 6 1 chunk +6 lines, -3 lines 0 comments Download
M sdk/lib/io/http_impl.dart View 1 2 3 4 5 6 2 chunks +6 lines, -2 lines 0 comments Download
M sdk/lib/io/socket.dart View 1 2 3 4 5 6 2 chunks +6 lines, -3 lines 0 comments Download
M tests/standalone/io/raw_socket_test.dart View 1 2 3 4 5 6 7 8 9 6 chunks +31 lines, -5 lines 0 comments Download
M tests/standalone/io/raw_socket_typed_data_test.dart View 1 2 3 4 5 6 4 chunks +8 lines, -0 lines 0 comments Download
M tests/standalone/io/socket_exception_test.dart View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Søren Gjesse
7 years, 7 months ago (2013-05-08 12:59:00 UTC) #1
Anders Johnsen
LGTM! https://codereview.chromium.org/14864009/diff/1/runtime/bin/socket_patch.dart File runtime/bin/socket_patch.dart (right): https://codereview.chromium.org/14864009/diff/1/runtime/bin/socket_patch.dart#newcode975 runtime/bin/socket_patch.dart:975: void destroy() { return Future<Socket>. https://codereview.chromium.org/14864009/diff/1/tests/standalone/io/echo_server_stream_test.dart File tests/standalone/io/echo_server_stream_test.dart ...
7 years, 7 months ago (2013-05-08 13:11:47 UTC) #2
Anders Johnsen
First update on this after working on it a bit. DisconnectEx can be compared to ...
7 years, 5 months ago (2013-06-27 14:26:39 UTC) #3
Anders Johnsen
Martin, can you take a look at this? Let me know if you need more ...
7 years, 5 months ago (2013-07-18 10:38:44 UTC) #4
kustermann
The main thing I don't understand is eventhandler_win.cc https://codereview.chromium.org/14864009/diff/27001/runtime/bin/eventhandler.h File runtime/bin/eventhandler.h (right): https://codereview.chromium.org/14864009/diff/27001/runtime/bin/eventhandler.h#newcode17 runtime/bin/eventhandler.h:17: // ...
7 years, 5 months ago (2013-07-18 11:34:46 UTC) #5
Anders Johnsen
PTAL https://codereview.chromium.org/14864009/diff/27001/runtime/bin/eventhandler.h File runtime/bin/eventhandler.h (right): https://codereview.chromium.org/14864009/diff/27001/runtime/bin/eventhandler.h#newcode17 runtime/bin/eventhandler.h:17: // information see the comments in socket_impl.dart On ...
7 years, 5 months ago (2013-07-19 10:49:07 UTC) #6
kustermann
lgtm :-) (But since I'm not the best reviewer for dart:io, you might want to ...
7 years, 5 months ago (2013-07-19 11:59:18 UTC) #7
Anders Johnsen
Thanks Martin. I'll try and land, while being very eager to revert :) https://codereview.chromium.org/14864009/diff/41001/runtime/bin/eventhandler_win.cc File ...
7 years, 5 months ago (2013-07-19 13:25:58 UTC) #8
Anders Johnsen
7 years, 5 months ago (2013-07-19 13:27:00 UTC) #9
Message was sent while issue was closed.
Committed patchset #13 manually as r25213 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698