diff --git a/README.md b/README.md index eea7135..ab685fc 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,9 @@ byte[] data = cast(byte[])"Hello"; /* When sending a message */ DataMessage tristanEncoded = new DataMessage(tag, data); + +/* Then send it */ +manager.sendMessage(tristanEncoded); ``` And let tristanable handle it! We even handle the message lengths and everything using another great project [bformat](http://deavmi.assigned.network/projects/bformat). diff --git a/source/tristanable/manager.d b/source/tristanable/manager.d index c9803e0..f4d030c 100644 --- a/source/tristanable/manager.d +++ b/source/tristanable/manager.d @@ -62,6 +62,12 @@ public final class Manager return matchingQueue; } + public void sendMessage(DataMessage message) + { + import bmessage; + sendMessage(socket, message); + } + /* TODO: Probably remove this or keep it */ public bool isValidTag(ulong tag) {