|
|
@ -15,7 +15,7 @@ let server = {} |
|
|
|
let registeredUserlist = require("../src/userlist.js") |
|
|
|
|
|
|
|
server.create = function create() { |
|
|
|
return net.createServer((socket) => { |
|
|
|
let server = net.createServer((socket) => { |
|
|
|
const user = new User(socket) |
|
|
|
socket.on('data', function (data) { |
|
|
|
let tokenized = data.toString("ascii").split("\r\n")[0].split(" ") |
|
|
@ -54,6 +54,12 @@ server.create = function create() { |
|
|
|
console.error(err); |
|
|
|
throw err; |
|
|
|
}); |
|
|
|
|
|
|
|
server.getUserlist = function() { |
|
|
|
return registeredUserlist |
|
|
|
} |
|
|
|
|
|
|
|
return server |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|