 
 (defun emdocs-broadcast-message (msg)
   (loop for client in *emdocs-server-clients*
-        do (process-send-string client msg)))
+        do (process-send-string (cdr client) msg)))
 
 (defun emdocs-emit-keypress-json (buffer type point content)
   (emdocs-broadcast-message

  (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))))

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

(defun emdocs-server-filter (sock msg)
  "docstring"
