shiffman/Most-Pixels-Ever-Processing

implement dataEvent() for sync clients

shiffman opened this issue · 1 comments

now that we have dataEvent() for async clients, I think I'll add it for sync.

void dataEvent(TCPClient c) {
  String[] messages = c.getDataMessage();
}

void frameEvent(TCPClient c) {
   // all of the drawing stuff using the data
}

If the user chooses not to implement the dataEvent() method they can still simply say:

void frameEvent(TCPClient c) {
  if (c.messageAvailable()) {
    String[] messages = c.getDataMessage();
  }
}

closed via fc66997 fc66997