(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
[inherit('common','pjson','pstomp')]
program send(input,output);

%include 'data.inc'
%include 'datajson.inc'

var
   ctx : stomp_ctx;
   o : array [1..3] of order;

begin
   %include 'init.inc'
   stomp_debug(0);
   stomp_init(ctx, 'localhost', 61613);
   stomp_write(ctx, 'DemoQ', format_data(o));
   stomp_write(ctx, 'DemoQ', format_data(o));
   stomp_write(ctx, 'DemoQ', format_data(o));
   stomp_write(ctx, 'DemoQ', 'quit');
   stomp_close(ctx);
end.
