code: public ClientSocket openIfHeartbeatActive()
    {
      if (_state.isClosed()) {
        return null;
      }
      
      if (! _isHeartbeatActive && _isHeartbeatServer) {
        return null;
      }
  
      ClientSocket stream = openRecycle();
  
      if (stream != null)
        return stream;
  
      return connect();
    }
docs: Open a stream if the target server's heartbeat is active.
  
  @return the socket's read/write pair.