@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);
    }
  }
 @Override
 public void ping(PingFrame frame, Callback callback) {
   if (frame.isReply()) callback.failed(new IllegalArgumentException());
   else control(null, callback, frame);
 }