+2004-11-05 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-rdcc.el (riece-rdcc-block-size): Changed default value to
+ 1024 due to the DCC specification.
+ (riece-rdcc-send-program): Wait ack from a recipient.
+ (riece-rdcc-filter): Send ack each time data arrives.
+
2004-10-30 Daiki Ueno <ueno@unixuser.org>
* riece-yank.el (riece-yank-strip-space): New user option.
File.open(" file ") {|file|
while (bytes = file.read(" block-size "))
total += bytes.length
- puts(\"#{total}\")
+ puts(total)
session.write(bytes)
+ begin
+ buf = session.read(4)
+ end until buf.unpack('N')[0] == total
end
}
session.close
:type 'directory
:group 'riece-rdcc)
-(defcustom riece-rdcc-block-size 4096
+(defcustom riece-rdcc-block-size 1024
"Number of bytes sent as a block."
:type 'integer
:group 'riece-rdcc)
(let ((coding-system-for-write 'binary)
jka-compr-compression-info-list jam-zcat-filename-list)
(write-region (point-min) (point-max) riece-rdcc-temp-file t 0))
+ (setq riece-rdcc-received-size (+ (buffer-size) riece-rdcc-received-size))
+ (process-send-string
+ process
+ (format "%c%c%c%c"
+ (lsh riece-rdcc-received-size -24)
+ (logand (lsh riece-rdcc-received-size -16) 255)
+ (logand (lsh riece-rdcc-received-size -8) 255)
+ (logand riece-rdcc-received-size 255)))
(message "Receiving %s from %s...(%s/%s)"
(file-name-nondirectory riece-rdcc-request-file)
riece-rdcc-request-user
- (riece-rdcc-format-size
- (setq riece-rdcc-received-size (+ (buffer-size)
- riece-rdcc-received-size)))
- (riece-rdcc-format-size riece-rdcc-request-size))))
+ (riece-rdcc-format-size riece-rdcc-received-size)
+ (riece-rdcc-format-size riece-rdcc-request-size))
+ (if (= riece-rdcc-received-size riece-rdcc-request-size)
+ (set-process-filter process nil))))
(defun riece-rdcc-sentinel (process status)
(save-excursion