Manager
- Added stub `sendMessage(TaggedMessage)` which will encode into the tristanable format, then wrap into bformat and send over the socket - Added import for `TaggedMessage` from `tristanable.encoding` module
This commit is contained in:
parent
ed68bf7cd6
commit
a05bc3e2fd
|
@ -7,6 +7,7 @@ import std.socket;
|
|||
import tristanable.queue : Queue;
|
||||
import core.sync.mutex : Mutex;
|
||||
import tristanable.manager.watcher : Watcher;
|
||||
import tristanable.encoding : TaggedMessage;
|
||||
|
||||
/**
|
||||
* Manages a provided socket by spawning
|
||||
|
@ -68,6 +69,17 @@ public class Manager
|
|||
|
||||
// TODO: Unlock queue
|
||||
}
|
||||
|
||||
public void sendMessage(TaggedMessage tag)
|
||||
{
|
||||
// TODO: Send the given message
|
||||
|
||||
// TODO: Encode into bytes; call it `x`
|
||||
|
||||
// TODO: Wrap `x` in bformat; call it `y`
|
||||
|
||||
// TODO: Do socket.send(`y`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue