fix: packet type
This commit is contained in:
parent
c908a21f3a
commit
7f00af29e8
|
@ -69,7 +69,7 @@ export default class SocketClient extends decorate(Class) {
|
|||
debug(type);
|
||||
this.emit(type, ...args);
|
||||
}));
|
||||
const Packets = Object.values(packets(this.latus).fromName);
|
||||
const Packets = Object.values(packets(this.latus).fromType);
|
||||
for (let i = 0; i < Packets.length; i++) {
|
||||
const Packet = Packets[i];
|
||||
const {id} = Packet;
|
||||
|
|
|
@ -11,7 +11,7 @@ export default {
|
|||
createSocketServer(httpServer, latus);
|
||||
},
|
||||
'@latus/repl/context': (latus) => ({
|
||||
Packets: packets(latus).fromName,
|
||||
Packets: packets(latus).fromType,
|
||||
sockets: latus.config['%sockets'],
|
||||
}),
|
||||
'@latus/socket/connect': (socket) => {
|
||||
|
|
|
@ -22,7 +22,7 @@ export default class ServerSocket extends decorate(Class) {
|
|||
this.socket.emitPromise = promisify(precalc.emit.bind(precalc));
|
||||
this.socket.joinPromise = promisify(this.socket.join.bind(this.socket));
|
||||
this.socket.leavePromise = promisify(this.socket.leave.bind(this.socket));
|
||||
const Packets = Object.entries(packets(latus).fromName);
|
||||
const Packets = Object.entries(packets(latus).fromType);
|
||||
for (let i = 0; i < Packets.length; i++) {
|
||||
const [name, Packet] = Packets[i];
|
||||
const {id} = Packet;
|
||||
|
|
Loading…
Reference in New Issue
Block a user