Change dir structure and add README
parent
45d0b6d2c4
commit
7bdbd47eab
@ -0,0 +1,4 @@
|
||||
# Stomp.el - STOMP in elisp
|
||||
This is a small elisp library with functions for parsing, recieving,
|
||||
composing and sending STOMP frames. The functions can be used in
|
||||
combination with emacs processes to recieve and send frames.
|
@ -0,0 +1,21 @@
|
||||
(require 'map)
|
||||
(load-file "/home/hugo/projects/stomp/stomp.el")
|
||||
|
||||
;; (setq proc (make-process
|
||||
;; :name "stomp-client"
|
||||
;; :buffer "Barry"
|
||||
;; :command "nc localhost 61613"
|
||||
;; :filter (stomp-filter-function (lambda (frame) (frame "%s" frame)))))
|
||||
|
||||
(setq proc (make-network-process
|
||||
:name "stomp-client"
|
||||
:buffer "stomp-frames"
|
||||
:host "127.0.0.1"
|
||||
:service 61613
|
||||
:filter (stomp-filter-function (lambda (frame) (message "%s" frame)))))
|
||||
|
||||
(setq frame ())
|
||||
(stomp-send-frame proc (map-put frame 'command "CONNECT"))
|
||||
(stomp-send-frame proc '((command . "SUBSCRIBE") (headers ("destination" . "/queue/testing"))))
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
(require 'map)
|
||||
(load-file "/home/hugo/projects/stomp/stomp.el")
|
||||
|
||||
;; (setq proc (make-process
|
||||
;; :name "stomp-client"
|
||||
;; :buffer "Barry"
|
||||
;; :command "nc localhost 61613"
|
||||
;; :filter (stomp-filter-function (lambda (message) (message "%s" message)))))
|
||||
|
||||
(setq proc (make-network-process
|
||||
:name "stomp-client"
|
||||
:buffer "stomp-messages"
|
||||
:host "127.0.0.1"
|
||||
:service 61613
|
||||
:filter (stomp-filter-function (lambda (message) (message "%s" message)))))
|
||||
|
||||
(setq message ())
|
||||
(stomp-send-message proc (map-put message 'command "CONNECT"))
|
||||
|
||||
|
Loading…
Reference in New Issue