@doomrooms/gameserver
Advanced tools
Comparing version 0.0.1 to 0.0.2
18
index.js
const EventEmitter = require('eventemitter3'); | ||
const { Connection, Room } = require('@doomrooms/common'); | ||
const { Connection, PipeConnection, Room } = require('@doomrooms/common'); | ||
@@ -29,13 +29,11 @@ class Gameserver extends EventEmitter { | ||
const [ player, privateId ] = args; | ||
const pipeConn = new this.options.protocol( | ||
this.options.host, | ||
this.options.pipePort, | ||
); | ||
pipeConn.connect().then(() => { | ||
return pipeConn.sendRaw(privateId + '\n'); | ||
}).then(() => { | ||
this.emit(event, player, pipeConn); | ||
const pipeConn = new PipeConnection({ | ||
host: this.options.host, | ||
port: this.options.pipePort, | ||
protocol: this.options.protocol, | ||
id: privateId, | ||
}); | ||
this.emit(event, player, pipeConn); | ||
} else { | ||
this.emit(event, args); | ||
this.emit(event, ...args); | ||
} | ||
@@ -42,0 +40,0 @@ |
{ | ||
"name": "@doomrooms/gameserver", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -13,5 +13,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@doomrooms/common": "0.0.2", | ||
"@doomrooms/common": "0.0.3", | ||
"eventemitter3": "^3.1.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2280
67
+ Added@doomrooms/common@0.0.3(transitive)
- Removed@doomrooms/common@0.0.2(transitive)
Updated@doomrooms/common@0.0.3