Compare commits

..

2 Commits

2 changed files with 4 additions and 4 deletions

View File

@ -159,8 +159,8 @@ class MultiSocketProxy extends proxy_js_1.default {
const self = this;
const message = await peer.channel.addMessage({
encoding: {
preencode: compact_encoding_1.json.preencode,
encode: compact_encoding_1.json.encode,
preencode: this._server ? socketEncoding.preencode : compact_encoding_1.json.preencode,
encode: this._server ? socketEncoding.encode : compact_encoding_1.json.encode,
decode: this._server ? compact_encoding_1.json.decode : socketEncoding.decode,
},
async onmessage(m) {

View File

@ -199,8 +199,8 @@ export default class MultiSocketProxy extends Proxy {
const self = this;
const message = await peer.channel.addMessage({
encoding: {
preencode: json.preencode,
encode: json.encode,
preencode: this._server ? socketEncoding.preencode : json.preencode,
encode: this._server ? socketEncoding.encode : json.encode,
decode: this._server ? json.decode : socketEncoding.decode,
},
async onmessage(m: SocketRequest | TcpSocketConnectOpts) {