code: public final ZEvent nextEvent(boolean wait)
      {
          if (!started) {
              System.out.println("ZMonitor: Start before getting events.");
              return null;
          }
          ZMsg msg = agent.recv(wait);
          if (msg == null) {
              return null;
          }
          return new ZEvent(msg);
      }
docs: Gets the next event, blocking for it until available if requested.
  @param wait true to block until next event is available, false to immediately return with null if there is no event.
  @return the next event or null if there is currently none.