Exemplo n.º 1
0
  @Override
  public void onPing(PingFrame frame) {
    if (LOG.isDebugEnabled()) LOG.debug("Received {}", frame);

    if (frame.isReply()) {
      notifyPing(this, frame);
    } else {
      PingFrame reply = new PingFrame(frame.getPayload(), true);
      control(null, Callback.NOOP, reply);
    }
  }
Exemplo n.º 2
0
 @Override
 public void ping(PingFrame frame, Callback callback) {
   if (frame.isReply()) callback.failed(new IllegalArgumentException());
   else control(null, callback, frame);
 }