projecte_ionic/node_modules/socket.io-parser/dist/binary.d.ts
2022-02-09 18:30:03 +01:00

21 lines
673 B
TypeScript
Executable file

/**
* Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.
*
* @param {Object} packet - socket.io event packet
* @return {Object} with deconstructed packet and list of buffers
* @public
*/
export declare function deconstructPacket(packet: any): {
packet: any;
buffers: any[];
};
/**
* Reconstructs a binary packet from its placeholder packet and buffers
*
* @param {Object} packet - event packet with placeholders
* @param {Array} buffers - binary buffers to put in placeholder positions
* @return {Object} reconstructed packet
* @public
*/
export declare function reconstructPacket(packet: any, buffers: any): any;