# negotiate method

1. @override

Future <void> negotiate(

1. XMPPStreamObject event

)
override

Called whenever the stream buffer outputs a new event `event`.

## Implementation

    @override
    Future<void> negotiate(XMPPStreamObject event) async {
      if (event is XMPPStreamElement) {
        if (event.node.tag == 'stream:features') {
          // Store the received stream features
          _streamFeatures
            ..clear()
            ..addAll(event.node.children);
        }

        await _executeCurrentNegotiator(event.node);
      }
    }