Additional async rewrite

This commit is contained in:
mmorrison 2019-01-12 04:43:36 -06:00
parent efe12a00aa
commit 29ce0b82d0
24 changed files with 654 additions and 470 deletions

View file

@ -2,9 +2,13 @@ const Core = require('./core'),
Varint = require('varint');
class Minecraft extends Core {
constructor() {
super();
this.srvRecord = "_minecraft._tcp";
}
async run(state) {
const portBuf = Buffer.alloc(2);
portBuf.writeUInt16BE(this.options.port_query,0);
portBuf.writeUInt16BE(this.options.port,0);
const addressBuf = Buffer.from(this.options.host,'utf8');