Commits

Meikel Brandmeyer committed 30a486e

Add send-message

Comments (0)

Files changed (1)

nrepl-client/nrepl-client/nrepl-client.factor

    "}" print
    flush
    drop ;
+
+: send-message ( message -- response )
+    "3"        print
+    "\"id\""   print "\"" write dup id>>    write "\"" print
+    "\"code\"" print "\"" write dup code>>  write "\"" print
+    "\"in\""   print "\"" write dup stdin>> write "\"" print
+    id>> <response> ;