                                          :process sock
                                          :attached-buffer buffer
                                          :ip ip))
+             (emdocs-broadcast-buffer-at-intervals buffer sock)
              (unless (find ip *emdocs-outgoing-clients*
                            :test #'emdocs-is-ip-from-client)
                (emdocs-connect-client buffer ip))

    (setq emdocs-mode nil)))

(defun emdocs-test-if-client-attached-to-buffer (client)
  (string-equal
   (emdocs-get-attached-buffer client)
   (buffer-name)))

(defun emdocs-disconnect ()
  "docstring"
  (loop for client in *emdocs-outgoing-clients*
        do (when (emdocs-test-if-client-attached-to-buffer client)
             (delete-process (emdocs-get-process client))))
  (setq *emdocs-outgoing-clients*
        (remove-if #'emdocs-test-if-client-attached-to-buffer
                   *emdocs-outgoing-clients*))
  (loop for client in *emdocs-incoming-clients*
        do (when (emdocs-test-if-client-attached-to-buffer client)
             (delete-process (emdocs-get-process client))))
  (setq *emdocs-incoming-clientbuffer
        (remove-if #'emdocs-test-if-client-attached-to-buffer
                   *emdocs-incoming-clients*))
  (setq-local after-change-functions
              (remove emdocs-after-change-lambda after-change-functions))
  (setq-local emdocs-after-change-lambda nil))

;;; interactives
(defun emdocs-kill-server ()

                (setq *emdocs-server* nil)
                (setq emdocs-mode nil)
                (emdocs-disconnect))
            (setq emdocs-initial-client nil)
            (unless (or (string-equal ip "localhost")
                        (string-equal ip ""))
