binary.d.ts 673 B

1234567891011121314151617181920
  1. /**
  2. * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.
  3. *
  4. * @param {Object} packet - socket.io event packet
  5. * @return {Object} with deconstructed packet and list of buffers
  6. * @public
  7. */
  8. export declare function deconstructPacket(packet: any): {
  9. packet: any;
  10. buffers: any[];
  11. };
  12. /**
  13. * Reconstructs a binary packet from its placeholder packet and buffers
  14. *
  15. * @param {Object} packet - event packet with placeholders
  16. * @param {Array} buffers - binary buffers to put in placeholder positions
  17. * @return {Object} reconstructed packet
  18. * @public
  19. */
  20. export declare function reconstructPacket(packet: any, buffers: any): any;