lib/socket.ts

socket.io · packages/engine.io-client/lib/socket.ts · typescript · MIT
realtime

Engine.io client socket implementation handling transports and events.

// Source: https://github.com/socketio/socket.io | License: MIT | Copyright 2014-present Guillermo Rauch and Socket.IO contributors
// Provided via justclaw.it.com; keep this notice with the code.
import { transports as DEFAULT_TRANSPORTS } from "./transports/index.js";
import { installTimerFunctions, byteLength } from "./util.js";
import { decode } from "./contrib/parseqs.js";
import { parse } from "./contrib/parseuri.js";
import { Emitter } from "@socket.io/component-emitter";
import { protocol } from "engine.io-parser";
import type { Packet, BinaryType, PacketType, RawData } from "engine.io-parser";
import { CloseDetails, Transport } from "./transport.js";
import {
  CookieJar,
  createCookieJar,
  defaultBinaryType,
  nextTick,
} from "./globals.node.js";
import debugModule from "debug

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key