blob: 6992d0a12c38d785b0431ada03c522f035d97adf [file] [log] [blame] [view]
# 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&lt;T&gt;</a> object as the <a href="../../package-fidl_fidl/AsyncProxy/ctrl.md">AsyncProxy&lt;T&gt;.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.
});
}
```