mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
More async
This commit is contained in:
parent
29ce0b82d0
commit
e937c725bb
20 changed files with 100 additions and 86 deletions
|
|
@ -1,11 +1,6 @@
|
|||
const Core = require('./core');
|
||||
|
||||
class Mumble extends Core {
|
||||
constructor() {
|
||||
super();
|
||||
this.options.socketTimeout = 5000;
|
||||
}
|
||||
|
||||
async run(state) {
|
||||
const json = await this.withTcp(async socket => {
|
||||
return await this.tcpSend(socket, 'json', (buffer) => {
|
||||
|
|
@ -24,6 +19,7 @@ class Mumble extends Core {
|
|||
|
||||
state.raw = json;
|
||||
state.name = json.name;
|
||||
state.gamePort = json.x_gtmurmur_connectport || 64738;
|
||||
|
||||
let channelStack = [state.raw.root];
|
||||
while(channelStack.length) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue