waitForMessage method

Future<ButtplugServerMessage> waitForMessage(
  1. int id
)

Implementation

Future<ButtplugServerMessage> waitForMessage(int id) async {
  if (!waitingFutures.containsKey(id)) {
    logError("No message with $id currently being waited on");
    throw ButtplugMessageException("No message with $id currently being waited on");
  }
  return await waitingFutures[id]!.completionFuture;
}