   :type 'hook
   :risky t)
 
+(defcustom ycmd-keepalive-period 30
+  "Number of seconds between keepalive messages."
+  :group 'ycmd
+  :type '(number))
+
 (defun ycmd-open ()
   "Start a new ycmd server.
 

  (when ycmd--notification-timer
    (cancel-timer ycmd--notification-timer)
    (setq ycmd--notification-timer nil)))

(defun ycmd--generate-hmac-secret ()
  "Generate a new, random 16-byte HMAC secret key."

                 ("X-Ycm-Hmac" . ,encoded-hex-hmac))
      :parser parser
      :data content
      :type type)

     (deferred:nextc it
       (lambda (req)
