perf: always hint binary
This commit is contained in:
parent
de2c7a28b4
commit
877541f6ce
|
@ -69,7 +69,7 @@ export class SocketClient extends decorate(class {}) {
|
|||
|
||||
send(packet) {
|
||||
const id = idFromPacket(packet.constructor);
|
||||
this.socket.emit(id, packet.data);
|
||||
this.socket.binary(true).emit(id, packet.data);
|
||||
}
|
||||
|
||||
tryReconnect() {
|
||||
|
|
|
@ -108,7 +108,7 @@ function onMessageEmit(args) {
|
|||
if (!socket) {
|
||||
return;
|
||||
}
|
||||
socket.emit(...args);
|
||||
socket.binary(true).emit(...args);
|
||||
}
|
||||
|
||||
function onMessageOn(type) {
|
||||
|
|
|
@ -62,7 +62,7 @@ class ServerSocket extends decorateSocket(class {}) {
|
|||
|
||||
send(packet) {
|
||||
const id = idFromPacket(packet.constructor);
|
||||
this.socket.emit(id, packet.data);
|
||||
this.socket.binary(true).emit(id, packet.data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user