perf: always hint binary

This commit is contained in:
cha0s 2019-05-16 15:19:42 -05:00
parent de2c7a28b4
commit 877541f6ce
3 changed files with 3 additions and 3 deletions

View File

@ -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() {

View File

@ -108,7 +108,7 @@ function onMessageEmit(args) {
if (!socket) {
return;
}
socket.emit(...args);
socket.binary(true).emit(...args);
}
function onMessageOn(type) {

View File

@ -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);
}
}