Refactored.

This commit is contained in:
Tristan B. Kildaire 2020-06-24 11:04:36 +02:00
parent d035cdc207
commit 65f5667eca
4 changed files with 14 additions and 6 deletions

View File

@ -2,6 +2,6 @@
"fileVersion": 1,
"versions": {
"bformat": "1.0.8",
"tristanable": "0.0.24"
"tristanable": "0.0.25"
}
}

View File

@ -2,6 +2,6 @@
"fileVersion": 1,
"versions": {
"bformat": "1.0.8",
"tristanable": "0.0.24"
"tristanable": "0.0.25"
}
}

View File

@ -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;
}

View File

@ -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 */