Subscribe the socket to events
, which will be pumped into the
eventStream.
Source
Future<Reply> event(List<String> events,
{String format: '', int timeoutSeconds: 10}) {
if (!EventFormat.supportedFormats.contains(format)) {
return new Future.error(new UnsupportedError(
'Format "$format" unsupported. Supported formats are: '
'${EventFormat.supportedFormats.join(', ')}'));
}
return _subscribeAndSendCommand('event ${format} ${events.join(' ')}',
new Duration(seconds: timeoutSeconds));
}