| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 http_multi_server; | 5 library http_multi_server; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 | 9 |
| 10 import 'src/multi_headers.dart'; | 10 import 'src/multi_headers.dart'; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 /// which header is returned for accessor methods. | 39 /// which header is returned for accessor methods. |
| 40 final HttpHeaders defaultResponseHeaders; | 40 final HttpHeaders defaultResponseHeaders; |
| 41 | 41 |
| 42 Duration get idleTimeout => _servers.first.idleTimeout; | 42 Duration get idleTimeout => _servers.first.idleTimeout; |
| 43 set idleTimeout(Duration value) { | 43 set idleTimeout(Duration value) { |
| 44 for (var server in _servers) { | 44 for (var server in _servers) { |
| 45 server.idleTimeout = value; | 45 server.idleTimeout = value; |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool get autoCompress => _servers.first.autoCompress; |
| 50 set autoCompress(bool value) { |
| 51 for (var server in _servers) { |
| 52 server.autoCompress = value; |
| 53 } |
| 54 } |
| 55 |
| 49 /// Returns the port that one of the wrapped servers is listening on. | 56 /// Returns the port that one of the wrapped servers is listening on. |
| 50 /// | 57 /// |
| 51 /// If the wrapped servers are listening on different ports, it's not defined | 58 /// If the wrapped servers are listening on different ports, it's not defined |
| 52 /// which port is returned. | 59 /// which port is returned. |
| 53 int get port => _servers.first.port; | 60 int get port => _servers.first.port; |
| 54 | 61 |
| 55 /// Returns the address that one of the wrapped servers is listening on. | 62 /// Returns the address that one of the wrapped servers is listening on. |
| 56 /// | 63 /// |
| 57 /// If the wrapped servers are listening on different addresses, it's not | 64 /// If the wrapped servers are listening on different addresses, it's not |
| 58 /// defined which address is returned. | 65 /// defined which address is returned. |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 for (var server in _servers) { | 148 for (var server in _servers) { |
| 142 var subInfo = server.connectionsInfo(); | 149 var subInfo = server.connectionsInfo(); |
| 143 info.total += subInfo.total; | 150 info.total += subInfo.total; |
| 144 info.active += subInfo.active; | 151 info.active += subInfo.active; |
| 145 info.idle += subInfo.idle; | 152 info.idle += subInfo.idle; |
| 146 info.closing += subInfo.closing; | 153 info.closing += subInfo.closing; |
| 147 } | 154 } |
| 148 return info; | 155 return info; |
| 149 } | 156 } |
| 150 } | 157 } |
| OLD | NEW |