Negotiator class abstract
Negotiator is a component capable of reaching agreement over what protocols to use for inbound streams of communication.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
handle(
P2PStream stream) → Future< void> - Handle calls Negotiate to determine which protocol handler to use for an inbound stream, then invokes the protocol handler function, passing it the protocol ID and the stream. Returns an error if negotiation fails.
-
negotiate(
P2PStream stream) → Future< (ProtocolID, HandlerFunc)> - Negotiate will return the registered protocol handler to use for a given inbound stream, returning after the protocol has been determined and the Negotiator has finished using the stream for negotiation. Returns an error if negotiation fails.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited