module Net::SSH::Transport::PacketStream

def if_needs_rekey?

yield. Otherwise, this does nothing.
client or server state objects, see State#needs_rekey?), this will
If the IO object requires a rekey operation (as indicated by either its
def if_needs_rekey?
  if client.needs_rekey? || server.needs_rekey?
    yield
    client.reset! if client.needs_rekey?
    server.reset! if server.needs_rekey?
  end
end