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: pkg/http/lib/src/io_client.dart

Issue 22284003: pkg: analysis aided cleanup (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: nits Created 7 years, 4 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 | « pkg/http/lib/src/client.dart ('k') | pkg/http/lib/src/mock_client.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library io_client; 5 library io_client;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'base_client.dart'; 10 import 'base_client.dart';
11 import 'base_request.dart'; 11 import 'base_request.dart';
12 import 'streamed_response.dart'; 12 import 'streamed_response.dart';
13 import 'utils.dart';
14 13
15 /// A `dart:io`-based HTTP client. This is the default client. 14 /// A `dart:io`-based HTTP client. This is the default client.
16 class IOClient extends BaseClient { 15 class IOClient extends BaseClient {
17 /// The underlying `dart:io` HTTP client. 16 /// The underlying `dart:io` HTTP client.
18 HttpClient _inner; 17 HttpClient _inner;
19 18
20 /// Creates a new HTTP client. 19 /// Creates a new HTTP client.
21 IOClient() : _inner = new HttpClient(); 20 IOClient() : _inner = new HttpClient();
22 21
23 /// Sends an HTTP request and asynchronously returns the response. 22 /// Sends an HTTP request and asynchronously returns the response.
(...skipping 27 matching lines...) Expand all
51 }); 50 });
52 } 51 }
53 52
54 /// Closes the client. This terminates all active connections. If a client 53 /// Closes the client. This terminates all active connections. If a client
55 /// remains unclosed, the Dart process may not terminate. 54 /// remains unclosed, the Dart process may not terminate.
56 void close() { 55 void close() {
57 if (_inner != null) _inner.close(force: true); 56 if (_inner != null) _inner.close(force: true);
58 _inner = null; 57 _inner = null;
59 } 58 }
60 } 59 }
OLDNEW
« no previous file with comments | « pkg/http/lib/src/client.dart ('k') | pkg/http/lib/src/mock_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698