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

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

Issue 262433003: Add writeHeaders argument to HttpResponse::detachSocket. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix comment. Created 6 years, 8 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 | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http.dart
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index b869f39aaef03a8b268026f0d2e5ce801dd0b43d..18360c64d6d85e50a2fb5f5f4dbeefd54a2c4de3 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -1128,8 +1128,12 @@ abstract class HttpResponse implements IOSink {
*
* This is normally used when a HTTP upgrade request is received
* and the communication should continue with a different protocol.
+ *
+ * If [writeHeaders] is `true`, the status line and [headers] will be written
+ * to the socket before it's detached. If `false`, the socket is detached
+ * immediately, without any data written to the socket. Default is `true`.
*/
- Future<Socket> detachSocket();
+ Future<Socket> detachSocket({bool writeHeaders: true});
/**
* Gets information about the client connection. Returns [:null:] if the
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698