class Net::SSH::Transport::Session

def closed?

Returns true if the underlying socket has been closed.
def closed?
  socket.closed?
end