setup method

void setup()

Sets up event listeners.

Implementation

void setup() {
  decoder.on('decoded', ondecoded);
  conn.on('data', ondata);
  conn.on('error', (data) {});
  conn.on('close', onClose);
}