def should_send_ping?(now, keep_alive, last_packet_received_at)
      last_pingreq_sent_at = @sender.last_pingreq_sent_at
      last_pingresp_received_at = @handler.last_pingresp_received_at
      if !last_pingreq_sent_at || (last_pingresp_received_at && (last_pingreq_sent_at <= last_pingresp_received_at))
        next_pingreq_at = [@sender.last_packet_sent_at, last_packet_received_at].min + (keep_alive * 0.7).ceil
        return next_pingreq_at <= now
      end
    end
def should_send_ping?(now, keep_alive, last_packet_received_at)
      last_pingreq_sent_at = @sender.last_pingreq_sent_at
      last_pingresp_received_at = @handler.last_pingresp_received_at
      if !last_pingreq_sent_at || (last_pingresp_received_at && (last_pingreq_sent_at <= last_pingresp_received_at))
        next_pingreq_at = [@sender.last_packet_sent_at, last_packet_received_at].min + (keep_alive * 0.7).ceil
        return next_pingreq_at <= now
      end
    end
Would return 'true' if ping requset should be sent and  'nil' if not