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

ngx-socket-io

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-socket-io - npm Package Compare versions

Comparing version 4.8.1 to 4.8.2

2

index.d.ts

@@ -1,3 +0,3 @@

export { SocketIoModule } from './src/socket-io.module';
export { SocketIoModule, SOCKET_CONFIG_TOKEN } from './src/socket-io.module';
export { SocketIoConfig } from './src/config/socket-io.config';
export { WrappedSocket as Socket } from './src/socket-io.service';
{
"name": "ngx-socket-io",
"version": "4.8.1",
"version": "4.8.2",
"description": "Socket.IO module for Angular",

@@ -5,0 +5,0 @@ "main": "index.ts",

@@ -138,4 +138,6 @@ # ngx-socket-io

Takes an namespace.
Works the same as in Socket.IO.
Takes a namespace and returns an instance based on the current config and the given namespace,
that is added to the end of the current url.
See [Namespaces - Client Initialization](https://socket.io/docs/v4/namespaces/#client-initialization).
Instances are reused based on the namespace.

@@ -142,0 +144,0 @@ ### `socket.on(eventName: string, callback: Function)`

@@ -7,25 +7,47 @@ import { Observable } from 'rxjs';

eventObservables$: Record<string, Observable<any>>;
namespaces: Record<string, WrappedSocket>;
ioSocket: any;
emptyConfig: SocketIoConfig;
constructor(config: SocketIoConfig);
of(namespace: string): void;
on(eventName: string, callback: Function): void;
once(eventName: string, callback: Function): void;
connect(callback?: (err: any) => void): any;
disconnect(_close?: any): any;
emit(_eventName: string, ..._args: any[]): any;
removeListener(_eventName: string, _callback?: Function): any;
removeAllListeners(_eventName?: string): any;
/**
* Gets a WrappedSocket for the given namespace.
*
* @note if an existing socket exists for the given namespace, it will be reused.
*
* @param namespace the namespace to create a new socket based on the current config.
* If empty or `/`, then the current instance is returned.
* @returns a socket that is bound to the given namespace. If namespace is empty or `/`,
* then `this` is returned, otherwise another instance is returned, creating
* it if it's the first use of such namespace.
*/
of(namespace: string): WrappedSocket;
on(eventName: string, callback: Function): this;
once(eventName: string, callback: Function): this;
connect(): this;
disconnect(): this;
emit(_eventName: string, ..._args: any[]): this;
send(..._args: any[]): this;
emitWithAck<T>(_eventName: string, ..._args: any[]): Promise<T>;
removeListener(_eventName: string, _callback?: Function): this;
removeAllListeners(_eventName?: string): this;
fromEvent<T>(eventName: string): Observable<T>;
fromOneTimeEvent<T>(eventName: string): Promise<T>;
listeners(eventName: string): any;
listenersAny(): any;
listenersAnyOutgoing(): any;
off(eventName?: string, listener?: Function[]): any;
onAny(callback: (event: string, ...args: any[]) => void): any;
onAnyOutgoing(callback: (event: string, ...args: any[]) => void): any;
prependAny(callback: (event: string, ...args: any[]) => void): any;
prependAnyOutgoing(callback: (event: string | symbol, ...args: any[]) => void): any;
timeout(value: number): any;
volatile(): any;
listeners(eventName: string): Function[];
listenersAny(): Function[];
listenersAnyOutgoing(): Function[];
off(eventName?: string, listener?: Function[]): this;
offAny(callback?: (event: string, ...args: any[]) => void): this;
offAnyOutgoing(callback?: (event: string, ...args: any[]) => void): this;
onAny(callback: (event: string, ...args: any[]) => void): this;
onAnyOutgoing(callback: (event: string, ...args: any[]) => void): this;
prependAny(callback: (event: string, ...args: any[]) => void): this;
prependAnyOutgoing(callback: (event: string | symbol, ...args: any[]) => void): this;
timeout(value: number): this;
get volatile(): this;
get active(): boolean;
get connected(): boolean;
get disconnected(): boolean;
get recovered(): boolean;
get id(): string;
compress(value: boolean): this;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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