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

Side by Side 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, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * HTTP status codes. 8 * HTTP status codes.
9 */ 9 */
10 abstract class HttpStatus { 10 abstract class HttpStatus {
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 */ 1121 */
1122 Future redirect(Uri location, {int status: HttpStatus.MOVED_TEMPORARILY}); 1122 Future redirect(Uri location, {int status: HttpStatus.MOVED_TEMPORARILY});
1123 1123
1124 /** 1124 /**
1125 * Detaches the underlying socket from the HTTP server. When the 1125 * Detaches the underlying socket from the HTTP server. When the
1126 * socket is detached the HTTP server will no longer perform any 1126 * socket is detached the HTTP server will no longer perform any
1127 * operations on it. 1127 * operations on it.
1128 * 1128 *
1129 * This is normally used when a HTTP upgrade request is received 1129 * This is normally used when a HTTP upgrade request is received
1130 * and the communication should continue with a different protocol. 1130 * and the communication should continue with a different protocol.
1131 *
1132 * If [writeHeaders] is `true`, the status line and [headers] will be written
1133 * to the socket before it's detached. If `false`, the socket is detached
1134 * immediately, without any data written to the socket. Default is `true`.
1131 */ 1135 */
1132 Future<Socket> detachSocket(); 1136 Future<Socket> detachSocket({bool writeHeaders: true});
1133 1137
1134 /** 1138 /**
1135 * Gets information about the client connection. Returns [:null:] if the 1139 * Gets information about the client connection. Returns [:null:] if the
1136 * socket is not available. 1140 * socket is not available.
1137 */ 1141 */
1138 HttpConnectionInfo get connectionInfo; 1142 HttpConnectionInfo get connectionInfo;
1139 } 1143 }
1140 1144
1141 1145
1142 /** 1146 /**
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 class RedirectException implements HttpException { 1917 class RedirectException implements HttpException {
1914 final String message; 1918 final String message;
1915 final List<RedirectInfo> redirects; 1919 final List<RedirectInfo> redirects;
1916 1920
1917 const RedirectException(this.message, this.redirects); 1921 const RedirectException(this.message, this.redirects);
1918 1922
1919 String toString() => "RedirectException: $message"; 1923 String toString() => "RedirectException: $message";
1920 1924
1921 Uri get uri => redirects.last.location; 1925 Uri get uri => redirects.last.location;
1922 } 1926 }
OLDNEW
« 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