Function: pop3-send-streaming-command

pop3-send-streaming-command is a byte-compiled function defined in pop3.el.gz.

Signature

(pop3-send-streaming-command PROCESS COMMAND MESSAGES TOTAL-SIZE)

Source Code

;; Defined in /usr/src/emacs/lisp/net/pop3.el.gz
(defun pop3-send-streaming-command (process command messages total-size)
  (erase-buffer)
  (let ((count (length messages))
	(i 1)
	(start-point (point-min))
	(waited-for 0))
    (while messages
      (process-send-string process (format "%s %d\r\n" command (pop messages)))
      ;; Only do 100 messages at a time to avoid pipe stalls.
      (when (zerop (% i pop3-stream-length))
	(setq start-point
	      (pop3-wait-for-messages process pop3-stream-length
				      total-size start-point))
        (incf waited-for pop3-stream-length))
      (incf i))
    (pop3-wait-for-messages process (- count waited-for)
			    total-size start-point)))