| |
| |
| |
| # AsyncProxyController<T> constructor |
| |
| |
| |
| |
| |
| |
| |
| AsyncProxyController<T>({String $serviceName, String $interfaceName}) |
| |
| |
| <p>Creates proxy controller.</p> |
| <p>Proxy controllers are not typically created directly. Instead, you |
| typically obtain an <a href="../../package-fidl_fidl/AsyncProxyController-class.md">AsyncProxyController<T></a> object as the <a href="../../package-fidl_fidl/AsyncProxy/ctrl.md">AsyncProxy<T>.ctrl</a> |
| property of a <code>TProxy</code> object.</p> |
| |
| |
| |
| ## Implementation |
| |
| ```dart |
| AsyncProxyController({this.$serviceName, this.$interfaceName}) { |
| _reader |
| ..onReadable = _handleReadable |
| ..onError = _handleError; |
| whenClosed.then((_) { |
| for (final Completer completer in _completerMap.values) { |
| if (!completer.isCompleted) { |
| completer.completeError(FidlError( |
| 'AsyncProxyController<${$interfaceName}> connection closed')); |
| } |
| } |
| _completerMap.clear(); |
| }, onError: (_) { |
| // Ignore errors. |
| }); |
| } |
| ``` |
| |
| |
| |
| |
| |
| |
| |