From 166d8d4ca5d9df90307ca8fe935b3ee96097befd Mon Sep 17 00:00:00 2001 From: "Mahlon E. Smith" Date: Sat, 28 Jun 2025 18:19:07 -0700 Subject: [PATCH] Fix code fence syntax highlighting. --- .hgignore | 5 ----- README.md | 14 +++++--------- 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 .hgignore diff --git a/.hgignore b/.hgignore deleted file mode 100644 index d0aabd0..0000000 --- a/.hgignore +++ /dev/null @@ -1,5 +0,0 @@ -syntax: glob -.cache -stomp -src/stomp -*.html diff --git a/README.md b/README.md index c1d2973..fe1a724 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ works for you with another broker, please let the author know. ### Installation ### -The easiest way to install this module is via the nimble package manager, +The easiest way to install this module is via the nimble package manager, by simply running 'nimble install stomp'. Alternatively, you can fetch the 'stomp.nim' file yourself, and put it @@ -70,8 +70,7 @@ by adding specific headers. You can also add "x-headers" that are carried betwe Another use is to issue "receipts" on sends or subscriptions, to ensure the broker has processed your request. Here's an example of how to perform receipt processing: -``` -#!nimrod +```nim proc accept_receipt( c: StompClient, r: StompResponse ) = var receipt = r[ "receipt-id" ] # ... match this receipt up to the request that generated it @@ -99,8 +98,7 @@ With one open transaction, messages are automatically attached to it. If you have multiple open transactions, you'll need to add which one you want a message to be part of via the custom headers. -``` -#!nimrod +```nim # Single transaction # client.begin( "trans-1" ) @@ -148,8 +146,7 @@ This is a complete client that does the following: with JSON results to the **user.created** key -- presumably to be picked up by another process elsewhere. -``` -#!nimrod +```nim # (This should be compiled with -d:ssl) import @@ -185,7 +182,7 @@ proc message( c: StompClient, r: StompResponse ) = # ... do the heavy lifting with the parsed data. # ... and assuming is was successful, ack and emit! - + c.ack( id ) var message = %*{ "user": json["user"].getStr, "otherstuff": true } @@ -209,4 +206,3 @@ client.subscribe( "/exchange/events/user.create", "client-individual" ) # Enter message loop. client.wait_for_messages ``` -