| 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; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 | 6 |
| 9 import 'handler.dart'; | 7 import 'handler.dart'; |
| 10 | 8 |
| 11 /// An [adapter][] with a concrete URL. | 9 /// An [adapter][] with a concrete URL. |
| 12 /// | 10 /// |
| 13 /// [adapter]: https://github.com/dart-lang/shelf#adapters | 11 /// [adapter]: https://github.com/dart-lang/shelf#adapters |
| 14 /// | 12 /// |
| 15 /// The most basic definiton of "adapter" includes any function that passes | 13 /// The most basic definiton of "adapter" includes any function that passes |
| 16 /// incoming requests to a [Handler] and passes its responses to some external | 14 /// incoming requests to a [Handler] and passes its responses to some external |
| (...skipping 27 matching lines...) Expand all Loading... |
| 44 /// Throws a [StateError] if there's already a handler mounted. | 42 /// Throws a [StateError] if there's already a handler mounted. |
| 45 void mount(Handler handler); | 43 void mount(Handler handler); |
| 46 | 44 |
| 47 /// Closes the server and returns a Future that completes when all resources | 45 /// Closes the server and returns a Future that completes when all resources |
| 48 /// are released. | 46 /// are released. |
| 49 /// | 47 /// |
| 50 /// Once this is called, no more requests will be passed to this server's | 48 /// Once this is called, no more requests will be passed to this server's |
| 51 /// handler. Otherwise, the cleanup behavior is implementation-dependent. | 49 /// handler. Otherwise, the cleanup behavior is implementation-dependent. |
| 52 Future close(); | 50 Future close(); |
| 53 } | 51 } |
| OLD | NEW |