diff --git a/example/client/dub.selections.json b/example/client/dub.selections.json index d94b63b..fe7dcdd 100644 --- a/example/client/dub.selections.json +++ b/example/client/dub.selections.json @@ -2,6 +2,6 @@ "fileVersion": 1, "versions": { "bformat": "1.0.8", - "tristanable": "0.0.24" + "tristanable": "0.0.25" } } diff --git a/example/server/dub.selections.json b/example/server/dub.selections.json index d94b63b..fe7dcdd 100644 --- a/example/server/dub.selections.json +++ b/example/server/dub.selections.json @@ -2,6 +2,6 @@ "fileVersion": 1, "versions": { "bformat": "1.0.8", - "tristanable": "0.0.24" + "tristanable": "0.0.25" } } diff --git a/source/tristanable/manager.d b/source/tristanable/manager.d index b25bc51..ffe947d 100644 --- a/source/tristanable/manager.d +++ b/source/tristanable/manager.d @@ -154,10 +154,8 @@ public final class Manager /* Check if the request has been fulfilled */ if(request.isFulfilled()) { - receivedData = request.dataReceived; + receivedData = request.pullData(); - /* TODO: Set the request to dead now */ - request.isDead = true; active = false; } diff --git a/source/tristanable/request.d b/source/tristanable/request.d index 1987d7b..8a8a0e6 100644 --- a/source/tristanable/request.d +++ b/source/tristanable/request.d @@ -23,7 +23,7 @@ public final class Request private bool fulfilled; /** - * Whether + * Whether the request has been depleted */ public bool isDead; @@ -32,6 +32,10 @@ public final class Request */ public ulong tag; + /** + * Make a new Request with the provided tag + * `tag`. + */ this(ulong tag) { this.tag = tag; @@ -48,6 +52,12 @@ public final class Request return fulfilled; } + public byte[] pullData() + { + isDead = true; + return dataReceived; + } + override public string toString() { /* the toString string */