Initial es6 async conversion work

This commit is contained in:
mmorrison 2019-01-07 00:52:29 -06:00
parent a054557f10
commit 77b2cc1c7f
10 changed files with 773 additions and 748 deletions

View file

@ -7,10 +7,10 @@ class Armagetron extends Core {
this.byteorder = 'be';
}
run(state) {
async run(state) {
const b = Buffer.from([0,0x35,0,0,0,0,0,0x11]);
this.udpSend(b,(buffer) => {
await this.udpSend(b,(buffer) => {
const reader = this.reader(buffer);
reader.skip(6);
@ -37,7 +37,7 @@ class Armagetron extends Core {
state.raw.uri = this.readString(reader);
state.raw.globalids = this.readString(reader);
this.finish(state);
return true;
return null;
});
}