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

@types/websocket

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/websocket - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

49

websocket/index.d.ts

@@ -27,6 +27,10 @@ // Type definitions for websocket 1.0

* Single frame messages will also be limited to this maximum.
* @default 1MiB
*/
maxReceivedFrameSize?: number;
/** The maximum allowed aggregate message size (for fragmented messages) in bytes */
/**
* The maximum allowed aggregate message size (for fragmented messages) in bytes
* @default 8MiB
*/
maxReceivedMessageSize?: number;

@@ -599,17 +603,3 @@

/**
* The maximum allowed received frame size in bytes.
* Single frame messages will also be limited to this maximum.
* @default 1MiB
*/
maxReceivedFrameSize?: number;
/**
* The maximum allowed aggregate message size (for fragmented messages) in bytes.
* @default 8MiB
*/
maxReceivedMessageSize?: number;
/**
* Options to pass to https.request if connecting via TLS.
* See Node's HTTPS documentation
* Options to pass to `https.request` if connecting via TLS.
* @see https://nodejs.org/api/https.html#https_https_request_options_callback

@@ -621,10 +611,2 @@ */

export class client extends events.EventEmitter {
protocols: string[];
origin: string;
url: url.Url;
secure: boolean;
socket: net.Socket;
response: http.IncomingMessage;
firstDataChunk: Buffer | null;
constructor(ClientConfig?: IClientConfig);

@@ -636,12 +618,17 @@

*
* @param [origin] can be used in user-agent scenarios to identify the page containing
* any scripting content that caused the connection to be requested.
* @param requestUrl should be a standard websocket url
* @param [requestedProtocols] list of subprotocols supported by the client.
* The remote server will select the best subprotocol that it supports and send that back when establishing the connection.
* @param [origin] Used in user-agent scenarios to identify the page containing
* any scripting content that caused the connection to be requested.
* @param [headers] additional arbitrary HTTP request headers to send along with the request.
* This may be used to pass things like access tokens, etc. so that the server can verify authentication/authorization
* before deciding to accept and open the full WebSocket connection.
* @param [extraRequestOptions] additional configuration options to be passed to `http.request` or `https.request`.
* This can be used to pass a custom `agent` to enable `client` usage from behind an HTTP or HTTPS proxy server
* using {@link https://github.com/koichik/node-tunnel|koichik/node-tunnel} or similar.
* @example client.connect('ws://www.mygreatapp.com:1234/websocketapp/')
*/
connect(requestUrl: url.Url | string, protocols?: string | string[], origin?: string, headers?: http.OutgoingHttpHeaders, extraRequestOptions?: http.RequestOptions): void;
connect(requestUrl: url.Url | string, requestedProtocols?: string | string[], origin?: string, headers?: http.OutgoingHttpHeaders, extraRequestOptions?: http.RequestOptions): void;
validateHandshake(): void;
failHandshake(errorDescription: string): void;
succeedHandshake(): void;
/**

@@ -648,0 +635,0 @@ * Will cancel an in-progress connection request before either the `connect` event or the `connectFailed` event has been emitted.

{
"name": "@types/websocket",
"version": "1.0.0",
"version": "1.0.1",
"description": "TypeScript definitions for websocket",

@@ -34,3 +34,3 @@ "license": "MIT",

"main": "",
"types": "index",
"types": "index.d.ts",
"repository": {

@@ -45,4 +45,4 @@ "type": "git",

},
"typesPublisherContentHash": "88109701fe99a4bb7dddd9b44db540e3c498938da879e7a4534f37d253d0bea8",
"typeScriptVersion": "2.2"
"typesPublisherContentHash": "b890f78b4d8f4617316b90fcba0e4e0555b1bdc780197d6420e6e9a80321a787",
"typeScriptVersion": "3.0"
}

@@ -8,10 +8,10 @@ # Installation

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/websocket
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/websocket.
Additional Details
* Last updated: Wed, 16 Oct 2019 17:28:14 GMT
* Dependencies: @types/node
### Additional Details
* Last updated: Tue, 07 Jul 2020 19:26:48 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node)
* Global values: none
# Credits
These definitions were written by Paul Loyd <https://github.com/loyd>, Kay Schecker <https://github.com/flynetworks>, Zhao Lei <https://github.com/zhaoleimxd>, Sheng Chen <https://github.com/jdneo>, and Matthew Peveler <https://github.com/MasterOdin>.
These definitions were written by [Paul Loyd](https://github.com/loyd), [Kay Schecker](https://github.com/flynetworks), [Zhao Lei](https://github.com/zhaoleimxd), [Sheng Chen](https://github.com/jdneo), and [Matthew Peveler](https://github.com/MasterOdin).

Sorry, the diff of this file is not supported yet

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