async listen() {
    this.state = stateEnum.RUNNING;

    while (this.state === stateEnum.RUNNING) {
      try {
        const [type, data] = await this.server.receive();

        switch (type.toString()) {
          case topicEnum.FULLSTATE:
            await this.sendFullState();
            break;
          case topicEnum.HANDSHAKE:
            await this.handleHandshake(data);
            break;
          default:
            // REP/REQ sockets expect a reply to each request made, so we have
            // to send some kind of response on an invalid request received
            await this.server.send([topicEnum.DISCARDED, null]);
        }
      } catch (e) {
        if (this.state !== stateEnum.CLOSED) {
          throw e;
        }
      }
    }
  }
Listens to incoming requests and answer to them.
Do NOT await this method, it's meant to run indefinitely until the close()
method is invoked.
This method can (and should) never return a rejected promise.

@returns {void}