OLD | NEW |
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 const int _OUTGOING_BUFFER_SIZE = 8 * 1024; | 7 const int _OUTGOING_BUFFER_SIZE = 8 * 1024; |
8 | 8 |
9 typedef void _BytesConsumer(List<int> bytes); | 9 typedef void _BytesConsumer(List<int> bytes); |
10 | 10 |
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 BadCertificateCallback _badCertificateCallback; | 1666 BadCertificateCallback _badCertificateCallback; |
1667 | 1667 |
1668 Duration get idleTimeout => _idleTimeout; | 1668 Duration get idleTimeout => _idleTimeout; |
1669 | 1669 |
1670 int maxConnectionsPerHost; | 1670 int maxConnectionsPerHost; |
1671 | 1671 |
1672 bool autoUncompress = true; | 1672 bool autoUncompress = true; |
1673 | 1673 |
1674 String userAgent = _getHttpVersion(); | 1674 String userAgent = _getHttpVersion(); |
1675 | 1675 |
1676 _HttpClient(SecurityContext this._context); | 1676 _HttpClient(this._context); |
1677 | 1677 |
1678 void set idleTimeout(Duration timeout) { | 1678 void set idleTimeout(Duration timeout) { |
1679 _idleTimeout = timeout; | 1679 _idleTimeout = timeout; |
1680 for (var c in _connectionTargets.values) { | 1680 for (var c in _connectionTargets.values) { |
1681 for (var idle in c._idle) { | 1681 for (var idle in c._idle) { |
1682 // Reset timer. This is fine, as it's not happening often. | 1682 // Reset timer. This is fine, as it's not happening often. |
1683 idle.stopTimer(); | 1683 idle.stopTimer(); |
1684 idle.startTimer(); | 1684 idle.startTimer(); |
1685 } | 1685 } |
1686 } | 1686 } |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2862 const _RedirectInfo(this.statusCode, this.method, this.location); | 2862 const _RedirectInfo(this.statusCode, this.method, this.location); |
2863 } | 2863 } |
2864 | 2864 |
2865 String _getHttpVersion() { | 2865 String _getHttpVersion() { |
2866 var version = Platform.version; | 2866 var version = Platform.version; |
2867 // Only include major and minor version numbers. | 2867 // Only include major and minor version numbers. |
2868 int index = version.indexOf('.', version.indexOf('.') + 1); | 2868 int index = version.indexOf('.', version.indexOf('.') + 1); |
2869 version = version.substring(0, index); | 2869 version = version.substring(0, index); |
2870 return 'Dart/$version (dart:io)'; | 2870 return 'Dart/$version (dart:io)'; |
2871 } | 2871 } |
OLD | NEW |