engine.io-parser

  • Version 5.2.2
  • Published
  • 46.5 kB
  • No dependencies
  • MIT license

Install

npm i engine.io-parser
yarn add engine.io-parser
pnpm add engine.io-parser

Overview

Parser for the client for the realtime Engine

Index

Variables

variable protocol

const protocol: number;

    Functions

    function createPacketDecoderStream

    createPacketDecoderStream: (
    maxPayload: number,
    binaryType: BinaryType
    ) => TransformStream<Uint8Array, any>;

      function createPacketEncoderStream

      createPacketEncoderStream: () => TransformStream<Packet, any>;

        function decodePacket

        decodePacket: (encodedPacket: RawData, binaryType?: BinaryType) => Packet;

          function decodePayload

          decodePayload: (encodedPayload: string, binaryType?: BinaryType) => Packet[];

            function encodePacket

            encodePacket: (
            { type, data }: Packet,
            supportsBinary: boolean,
            callback: (encodedPacket: RawData) => void
            ) => void;

              function encodePayload

              encodePayload: (
              packets: Packet[],
              callback: (encodedPayload: string) => void
              ) => void;

                Interfaces

                interface Packet

                interface Packet {}

                  property data

                  data?: RawData;

                    property options

                    options?: {
                    compress: boolean;
                    };

                      property type

                      type: PacketType;

                        Type Aliases

                        type BinaryType

                        type BinaryType = 'nodebuffer' | 'arraybuffer' | 'blob';

                          type PacketType

                          type PacketType =
                          | 'open'
                          | 'close'
                          | 'ping'
                          | 'pong'
                          | 'message'
                          | 'upgrade'
                          | 'noop'
                          | 'error';

                            type RawData

                            type RawData = any;

                              Package Files (4)

                              Dependencies (0)

                              No dependencies.

                              Dev Dependencies (17)

                              Peer Dependencies (0)

                              No peer dependencies.

                              Badge

                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/engine.io-parser.

                              • Markdown
                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/engine.io-parser)
                              • HTML
                                <a href="https://www.jsdocs.io/package/engine.io-parser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>