     (insert "sentinel:" msg)
     (unless (bolp) (newline)))
   (cond ((string-match "^open from [0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\n$" msg)
-         (add-to-list '*emdocs-server-clients* sock)
          (process-send-string sock "give me buffer and ip\n"))
         ((string-match "^connection broken by remote peer\n$" msg)
          (setq *emdocs-server-clients*
-               (delete sock *emdocs-server-clients*)))))
+               (rassq-delete-all sock *emdocs-server-clients*)))))
 
 (defun emdocs-server-filter (sock msg)
   "docstring"

  (let* ((json-object-type 'plist)
         (json-msg (json-read-from-string msg)))
    (unless (member (plist-get json-msg :ip) *emdocs-client-connections*)
      (emdocs-connect-client (plist-get json-msg :buffer)
                             (plist-get json-msg :ip))
      (emdocs-broadcast-message msg))))


(defun emdocs-broadcast-message (msg)
  (loop for client in *emdocs-server-clients*
        do (process-send-string (cdr client) msg)))

(defun emdocs-emit-keypress-json (buffer type point content)
  (emdocs-broadcast-message
