class Net::SSH::Transport::Session

def rekey_as_needed

one is performed, causing this method to block until it completes.
rekey is needed (as indicated by the socket, see PacketStream#if_needs_rekey?)
Returns immediately if a rekey is already in process. Otherwise, if a
def rekey_as_needed
  return if algorithms.pending?
  socket.if_needs_rekey? { rekey! }
end