Refactor waitForMessage to waitForPacket (since it returns a packet) and add a new waitForMessage which return the MessageBase, which makes usage a little tidier with async.

This commit is contained in:
Casper Warden
2018-10-06 16:03:10 +01:00
parent f5e3df4ebf
commit 11f2f9b320
34 changed files with 555 additions and 423 deletions

View File

@@ -66,4 +66,16 @@ export class UUID
const binary = Buffer.from(shortened, 'hex');
binary.copy(buf, pos, 0);
}
public equals(cmp: UUID | string): boolean
{
if (typeof cmp === 'string')
{
return (cmp === this.mUUID);
}
else
{
return cmp.equals(this.mUUID);
}
}
}