OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 shelf.server_handler; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 | 6 |
9 import 'package:async/async.dart'; | 7 import 'package:async/async.dart'; |
10 | 8 |
11 import 'request.dart'; | 9 import 'request.dart'; |
12 import 'handler.dart'; | 10 import 'handler.dart'; |
13 import 'server.dart'; | 11 import 'server.dart'; |
14 | 12 |
15 /// A connected pair of a [Server] and a [Handler]. | 13 /// A connected pair of a [Server] and a [Handler]. |
16 /// | 14 /// |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 79 |
82 _handler = handler; | 80 _handler = handler; |
83 _onMountedCompleter.complete(); | 81 _onMountedCompleter.complete(); |
84 } | 82 } |
85 | 83 |
86 Future close() => _closeMemo.runOnce(() { | 84 Future close() => _closeMemo.runOnce(() { |
87 return _onClose == null ? null : _onClose(); | 85 return _onClose == null ? null : _onClose(); |
88 }); | 86 }); |
89 final _closeMemo = new AsyncMemoizer(); | 87 final _closeMemo = new AsyncMemoizer(); |
90 } | 88 } |
OLD | NEW |