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

Side by Side Diff: dart/sdk/lib/io/http_impl.dart

Issue 60293003: Version 0.8.10.5 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/sdk/lib/io/http.dart ('k') | dart/sdk/lib/io/secure_socket.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 class _HttpIncoming extends Stream<List<int>> { 7 class _HttpIncoming extends Stream<List<int>> {
8 final int _transferLength; 8 final int _transferLength;
9 final Completer _dataCompleter = new Completer(); 9 final Completer _dataCompleter = new Completer();
10 Stream<List<int>> _stream; 10 Stream<List<int>> _stream;
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 final String password; 2194 final String password;
2195 final bool isDirect; 2195 final bool isDirect;
2196 } 2196 }
2197 2197
2198 2198
2199 class _HttpConnectionInfo implements HttpConnectionInfo { 2199 class _HttpConnectionInfo implements HttpConnectionInfo {
2200 static _HttpConnectionInfo create(Socket socket) { 2200 static _HttpConnectionInfo create(Socket socket) {
2201 if (socket == null) return null; 2201 if (socket == null) return null;
2202 try { 2202 try {
2203 _HttpConnectionInfo info = new _HttpConnectionInfo(); 2203 _HttpConnectionInfo info = new _HttpConnectionInfo();
2204 info.remoteHost = socket.remoteHost; 2204 info.remoteAddress = socket.remoteAddress;
2205 info.remotePort = socket.remotePort; 2205 info.remotePort = socket.remotePort;
2206 info.localPort = socket.port; 2206 info.localPort = socket.port;
2207 return info; 2207 return info;
2208 } catch (e) { } 2208 } catch (e) { }
2209 return null; 2209 return null;
2210 } 2210 }
2211 2211
2212 String remoteHost; 2212 InternetAddress remoteAddress;
2213 int remotePort; 2213 int remotePort;
2214 int localPort; 2214 int localPort;
2215 } 2215 }
2216 2216
2217 2217
2218 class _DetachedSocket extends Stream<List<int>> implements Socket { 2218 class _DetachedSocket extends Stream<List<int>> implements Socket {
2219 final Stream<List<int>> _incoming; 2219 final Stream<List<int>> _incoming;
2220 final Socket _socket; 2220 final Socket _socket;
2221 2221
2222 _DetachedSocket(this._socket, this._incoming); 2222 _DetachedSocket(this._socket, this._incoming);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2261 Future flush() => _socket.flush(); 2261 Future flush() => _socket.flush();
2262 2262
2263 Future close() => _socket.close(); 2263 Future close() => _socket.close();
2264 2264
2265 Future<Socket> get done => _socket.done; 2265 Future<Socket> get done => _socket.done;
2266 2266
2267 int get port => _socket.port; 2267 int get port => _socket.port;
2268 2268
2269 InternetAddress get address => _socket.address; 2269 InternetAddress get address => _socket.address;
2270 2270
2271 String get remoteHost => _socket.remoteHost; 2271 InternetAddress get remoteAddress => _socket.remoteAddress;
2272 2272
2273 int get remotePort => _socket.remotePort; 2273 int get remotePort => _socket.remotePort;
2274 2274
2275 bool setOption(SocketOption option, bool enabled) { 2275 bool setOption(SocketOption option, bool enabled) {
2276 return _socket.setOption(option, enabled); 2276 return _socket.setOption(option, enabled);
2277 } 2277 }
2278 } 2278 }
2279 2279
2280 2280
2281 class _AuthenticationScheme { 2281 class _AuthenticationScheme {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
2519 final Uri location; 2519 final Uri location;
2520 } 2520 }
2521 2521
2522 String _getHttpVersion() { 2522 String _getHttpVersion() {
2523 var version = Platform.version; 2523 var version = Platform.version;
2524 // Only include major and minor version numbers. 2524 // Only include major and minor version numbers.
2525 int index = version.indexOf('.', version.indexOf('.') + 1); 2525 int index = version.indexOf('.', version.indexOf('.') + 1);
2526 version = version.substring(0, index); 2526 version = version.substring(0, index);
2527 return 'Dart/$version (dart:io)'; 2527 return 'Dart/$version (dart:io)';
2528 } 2528 }
OLDNEW
« no previous file with comments | « dart/sdk/lib/io/http.dart ('k') | dart/sdk/lib/io/secure_socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698