about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorVincent Ambo <vincent@kivra.com>2016-02-09T00·17+0100
committerVincent Ambo <vincent@kivra.com>2016-02-09T00·17+0100
commite3fdb8c8c70fce79456dc67fa424d8ef251b5ea3 (patch)
tree09ba55999be5fb7e4dec72590f00286c1aac424e /include
parent0d608be29cbf75ecfc88a7be962130f3a5a38137 (diff)
Implement connecting and subscribing
Diffstat (limited to 'include')
-rw-r--r--include/stomp.hrl19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/stomp.hrl b/include/stomp.hrl
new file mode 100644
index 000000000000..8ac197f78e01
--- /dev/null
+++ b/include/stomp.hrl
@@ -0,0 +1,19 @@
+%% Client ack modes, refer to the STOMP protocol documentation
+-type ack_mode() :: client | client_individual | auto.
+
+%% Subscriptions are enumerated from 0
+-type sub_id() :: integer().
+
+%% Message IDs (for acknowledgements) are simple strings. They are
+%% extracted from the 'ack' field of the header in client or client-individual
+%% mode, and from the 'message-id' field in auto mode.
+-type message_id() :: binary().
+
+%% A destination can be a queue, or something else.
+%% Example: <<"/queue/lizards">>
+-type destination() :: binary().
+
+%% A STOMP message as received from a queue subscription
+-record(stomp_msg, { headers :: #{ binary() => binary() },
+                     body    :: binary() }).
+-type stomp_msg() :: #stomp_msg{}.