| |
| |
| |
| # bind method |
| |
| |
| |
| |
| |
| |
| |
| |
| void bind |
| ([InterfaceHandle](../../package-fidl_fidl/InterfaceHandle-class.md)<T> interfaceHandle) |
| |
| |
| |
| |
| |
| <p>Binds the proxy to the given interface handle.</p> |
| <p>Calls to the proxy will be encoded as messages and sent over the channel |
| underlying the given interface handle.</p> |
| <p>This object must not already be bound.</p> |
| <p>The <code>interfaceHandle</code> parameter must not be null. The <code>channel</code> property |
| of the given <code>interfaceHandle</code> must not be null.</p> |
| |
| |
| |
| ## Implementation |
| |
| ```dart |
| void bind(InterfaceHandle<T> interfaceHandle) { |
| assert(!isBound); |
| _reader.bind(interfaceHandle.passChannel()!); |
| |
| _boundCompleter.complete(); |
| final callback = onBind; |
| if (callback != null) { |
| callback(); |
| } |
| } |
| ``` |
| |
| |
| |
| |
| |
| |
| |