diff --git a/dub.json b/dub.json index 7cbfdef..a3e84f4 100644 --- a/dub.json +++ b/dub.json @@ -4,8 +4,9 @@ ], "copyright": "Copyright © 2021, Tristan B. Kildaire", "dependencies": { - "bformat": "~>3.1.3", - "msgpack-d": "~>1.0.3" + "bformat": "3.1.3", + "msgpack-d": "1.0.3", + "tasky": "1.0.1" }, "description": "Client-side DNET API", "license": "LGPLv2", diff --git a/dub.selections.json b/dub.selections.json new file mode 100644 index 0000000..cafe13d --- /dev/null +++ b/dub.selections.json @@ -0,0 +1,10 @@ +{ + "fileVersion": 1, + "versions": { + "bformat": "3.1.3", + "eventy": "0.2.2", + "msgpack-d": "1.0.3", + "tasky": "1.0.1", + "tristanable": "2.6.9" + } +} diff --git a/source/libdnet/libdnet.d b/source/libdnet/libdnet.d index 4b94298..a02eded 100644 --- a/source/libdnet/libdnet.d +++ b/source/libdnet/libdnet.d @@ -1,21 +1,32 @@ /** -* TODO +* TODO: We should make this a basew class that people have to ovverride and provide implementations for +* that hook into specific job descriptors */ module libdnet.libdnet; import std.socket : Address; +import tasky.engine : Engine; public class Client { + private Engine engine; + + private Address endpoint; + + + + + + /** * TODO: We need to re-write Tasky before we can start work on this (urgent) * TODO: We need to add signal handling to tristanable (not, urgent) * TODO: We need to check eventy and make sure it is fully completed and * documented and working (also check if it requires any signal handling, doubt) */ - this Client(Address endpoint) + this(Address endpoint) { /* TODO: Initialize stuff here */ @@ -23,6 +34,21 @@ public class Client } + /** + * Connect to the server + */ + public void connect() + { + /* FIXME: Don't start Tasky engine till we are actually connected (FIX in Tasky) */ + + /* Initialize a new Tasky engine */ + //engine = new Engine(); + + /* Start the Tasky engine */ + //engine.start(); + } + + /** * Login */