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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user