Refactored.
This commit is contained in:
parent
d035cdc207
commit
65f5667eca
|
@ -2,6 +2,6 @@
|
|||
"fileVersion": 1,
|
||||
"versions": {
|
||||
"bformat": "1.0.8",
|
||||
"tristanable": "0.0.24"
|
||||
"tristanable": "0.0.25"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
"fileVersion": 1,
|
||||
"versions": {
|
||||
"bformat": "1.0.8",
|
||||
"tristanable": "0.0.24"
|
||||
"tristanable": "0.0.25"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue