Compare commits
No commits in common. "3a1ea39a799f073431fcfea698b6c67a46de8c9a" and "3a41474b26f6dcf2ad982e4091c98839480e7738" have entirely different histories.
3a1ea39a79
...
3a41474b26
|
@ -45,14 +45,6 @@ const writeSocketEncoding = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const errorSocketEncoding = {
|
const errorSocketEncoding = {
|
||||||
preencode(state, m) {
|
|
||||||
socketEncoding.preencode(state, m);
|
|
||||||
compact_encoding_1.json.preencode(state, (0, serialize_error_1.serializeError)(m.err));
|
|
||||||
},
|
|
||||||
encode(state, m) {
|
|
||||||
socketEncoding.encode(state, m);
|
|
||||||
compact_encoding_1.json.encode(state, (0, serialize_error_1.serializeError)(m.err));
|
|
||||||
},
|
|
||||||
decode(state, m) {
|
decode(state, m) {
|
||||||
const socket = socketEncoding.decode(state, m);
|
const socket = socketEncoding.decode(state, m);
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Proxy, { ProxyOptions } from "../proxy.js";
|
import Proxy, { ProxyOptions } from "../proxy.js";
|
||||||
import TcpSocket from "./multiSocket/tcpSocket.js";
|
import TcpSocket from "./multiSocket/tcpSocket.js";
|
||||||
import { json, raw, uint } from "compact-encoding";
|
import { json, raw, uint } from "compact-encoding";
|
||||||
import { deserializeError, serializeError } from "serialize-error";
|
import { deserializeError } from "serialize-error";
|
||||||
import b4a from "b4a";
|
import b4a from "b4a";
|
||||||
import type { TcpSocketConnectOpts } from "net";
|
import type { TcpSocketConnectOpts } from "net";
|
||||||
import { DataSocketOptions, PeerOptions } from "../peer.js";
|
import { DataSocketOptions, PeerOptions } from "../peer.js";
|
||||||
|
@ -62,14 +62,6 @@ const writeSocketEncoding = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const errorSocketEncoding = {
|
const errorSocketEncoding = {
|
||||||
preencode(state: any, m: ErrorSocketRequest) {
|
|
||||||
socketEncoding.preencode(state, m);
|
|
||||||
json.preencode(state, serializeError(m.err));
|
|
||||||
},
|
|
||||||
encode(state: any, m: ErrorSocketRequest) {
|
|
||||||
socketEncoding.encode(state, m);
|
|
||||||
json.encode(state, serializeError(m.err));
|
|
||||||
},
|
|
||||||
decode(state: any, m: any): ErrorSocketRequest {
|
decode(state: any, m: any): ErrorSocketRequest {
|
||||||
const socket = socketEncoding.decode(state, m);
|
const socket = socketEncoding.decode(state, m);
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue