Add process to filter function callback arguments

master
Hugo Thunnissen 6 years ago
parent 61d8b91f8a
commit cdb1cacb20

@ -12,7 +12,7 @@
:buffer "stomp-frames" :buffer "stomp-frames"
:host "127.0.0.1" :host "127.0.0.1"
:service 61613 :service 61613
:filter (stomp-filter-function (lambda (frame) (message "%s" frame))))) :filter (stomp-filter-function (lambda (proc frame) (message "%s" frame)))))
(setq frame ()) (setq frame ())
(stomp-send-frame proc (map-put frame 'command "CONNECT")) (stomp-send-frame proc (map-put frame 'command "CONNECT"))

@ -35,7 +35,7 @@
(goto-char (point-max)) (goto-char (point-max))
(insert string) (insert string)
(let ((frame (stomp-shift-frame (current-buffer)))) (let ((frame (stomp-shift-frame (current-buffer))))
(if frame (funcall callback frame)))))) (if frame (funcall callback proc frame))))))
(defun stomp-shift-frame (buffer) (defun stomp-shift-frame (buffer)
"Read a frame from a buffer. After reading a frame, it will "Read a frame from a buffer. After reading a frame, it will

Loading…
Cancel
Save