Added `sendMessage` to bformat encode the final t-encoded message
This commit is contained in:
parent
ce3772c66c
commit
b060b30c44
|
@ -50,6 +50,9 @@ byte[] data = cast(byte[])"Hello";
|
||||||
|
|
||||||
/* When sending a message */
|
/* When sending a message */
|
||||||
DataMessage tristanEncoded = new DataMessage(tag, data);
|
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).
|
And let tristanable handle it! We even handle the message lengths and everything using another great project [bformat](http://deavmi.assigned.network/projects/bformat).
|
||||||
|
|
|
@ -62,6 +62,12 @@ public final class Manager
|
||||||
return matchingQueue;
|
return matchingQueue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void sendMessage(DataMessage message)
|
||||||
|
{
|
||||||
|
import bmessage;
|
||||||
|
sendMessage(socket, message);
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO: Probably remove this or keep it */
|
/* TODO: Probably remove this or keep it */
|
||||||
public bool isValidTag(ulong tag)
|
public bool isValidTag(ulong tag)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue