A channel over which messages from interface T can be received.
An interface request holds a channel whose peer expects to be able to send messages from the FIDL interface T. A channel held by an interface request is not currently bound, which means messages cannot yet be exchanged with the channel's peer.
To receive messages sent over the channel, bind the interface handle using
Binding<T>.bind on a TBinding
object, which you typically hold as a
private member variable in a class that implements T
.
Example:
class FooImpl extends Foo {
final FooBinding _binding = new FooBinding();
void bind(InterfaceRequest<T> request) {
_binding.bind(request);
}
@override
void bar() {
print('Received bar message.');
}
}
To obtain an interface request to send over a channel, used the
ProxyController<T>.request method on the Proxy<T>.ctrl property of an
object of type TProxy
.
Example:
FooProxy foo = new FooProxy();
InterfaceRequest<T> request = foo.ctrl.request();
Constructors
InterfaceRequest (Channel _channel)
Creates an interface request that wraps the given channel.
Properties
channel → Channel
The underlying channel messages will be received over when the interface
handle is bound to Binding.
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
Methods
close() void
Closes the underlying channel.
noSuchMethod(Invocation invocation) dynamic
Invoked when a non-existent method or property is accessed.
inherited
passChannel() Channel
Returns channel and sets channel to null
.
toString() String
A string representation of this object.
inherited
Operators
operator ==(Object other) bool
The equality operator.
inherited