igorsaux/bt
BYOND topic encoder library
bt is a library for decoding/encoding the binary "BYOND Topic" format, and two command-line tools:
bts — a tiny server that maps text queries to responses (string, number, or null).btc — a client that sends a query and prints the decoded response.zig buildzig build testzig build clientzig build serverThe next example runs a server that answers two queries:
?players returns the number 5?status returns the string "foobar"$ bts --ip 127.0.0.1 --port 1234 "?players" 5 "?status" foobar
Ask the server from the client:
$ btc 127.0.0.1:1234 ?status
foobar
CLI notes
btc <HOST>:<PORT> <QUERY>bts [--ip IP] [--port PORT] <MAPPING...>"<QUERY>" "<RESPONSE>".null.