Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

engine.io

Package Overview
Dependencies
Maintainers
2
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io - npm Package Compare versions

Comparing version 6.1.1 to 6.1.2

6

build/server.js

@@ -120,2 +120,8 @@ "use strict";

}
if (transport === "websocket" && !upgrade) {
debug("invalid transport upgrade");
return fn(Server.errors.BAD_REQUEST, {
name: "TRANSPORT_HANDSHAKE_ERROR"
});
}
if (!this.opts.allowRequest)

@@ -122,0 +128,0 @@ return fn();

8

build/socket.d.ts

@@ -99,3 +99,3 @@ /// <reference types="node" />

*
* @param {String} message
* @param {Object} data
* @param {Object} options

@@ -111,5 +111,7 @@ * @param {Function} callback

*
* @param {String} packet type
* @param {String} optional, data
* @param {String} type - packet type
* @param {String} data
* @param {Object} options
* @param {Function} callback
*
* @api private

@@ -116,0 +118,0 @@ */

@@ -340,3 +340,3 @@ "use strict";

*
* @param {String} message
* @param {Object} data
* @param {Object} options

@@ -358,5 +358,7 @@ * @param {Function} callback

*
* @param {String} packet type
* @param {String} optional, data
* @param {String} type - packet type
* @param {String} data
* @param {Object} options
* @param {Function} callback
*
* @api private

@@ -374,4 +376,4 @@ */

const packet = {
type: type,
options: options
type,
options
};

@@ -378,0 +380,0 @@ if (data)

/// <reference types="node" />
import { EventEmitter } from "events";
import { IncomingMessage } from "http";
import { Packet } from "engine.io-parser";
export declare abstract class Transport extends EventEmitter {

@@ -57,3 +58,3 @@ sid: string;

*/
protected onPacket(packet: any): void;
protected onPacket(packet: Packet): void;
/**

@@ -60,0 +61,0 @@ * Called with the encoded packet data.

import { AttachOptions, BaseServer } from "./server";
export interface uOptions {
/**
* What permessage-deflate compression to use. uWS.DISABLED, uWS.SHARED_COMPRESSOR or any of the uWS.DEDICATED_COMPRESSOR_xxxKB.
* @default uWS.DISABLED
*/
compression?: number;
/**
* Maximum amount of seconds that may pass without sending or getting a message. Connection is closed if this timeout passes. Resolution (granularity) for timeouts are typically 4 seconds, rounded to closest. Disable by using 0.
* @default 120
*/
idleTimeout?: number;
/**
* Maximum length of allowed backpressure per socket when publishing or sending messages. Slow receivers with too high backpressure will be skipped until they catch up or timeout.
* @default 1024 * 1024
*/
maxBackpressure?: number;
}
export declare class uServer extends BaseServer {

@@ -17,3 +34,3 @@ protected init(): void;

*/
attach(app: any, options?: AttachOptions): void;
attach(app: any, options?: AttachOptions & uOptions): void;
private handleRequest;

@@ -20,0 +37,0 @@ private handleUpgrade;

@@ -27,2 +27,5 @@ "use strict";

};
res.onAborted(() => {
debug("response has been aborted");
});
}

@@ -43,2 +46,5 @@ createTransport(transportName, req) {

.ws(path, {
compression: options.compression,
idleTimeout: options.idleTimeout,
maxBackpressure: options.maxBackpressure,
maxPayloadLength: this.opts.maxHttpBufferSize,

@@ -202,2 +208,5 @@ upgrade: this.handleUpgrade.bind(this),

}
onData(fn) {
this.res.onData(fn);
}
onAborted(fn) {

@@ -204,0 +213,0 @@ this.res.onAborted(fn);

{
"name": "engine.io",
"version": "6.1.1",
"version": "6.1.2",
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",

@@ -5,0 +5,0 @@ "type": "commonjs",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc