# Class WrappedSocket

- Defined in lib/socket-io.service.ts:18

#####
Index

### Constructors

constructor

### Properties

eventObservables$
ioSocket
subscribersCounter

### Methods

connect
disconnect
emit
fromEvent
fromOneTimeEvent
of
on
once
removeAllListeners
removeListener

## Constructors

### constructor

- new WrappedSocket(url, options?): WrappedSocket

- #### Parameters

  - url: string
  - options: SocketIoOptions = {}

  #### Returns WrappedSocket

  - Defined in lib/socket-io.service.ts:23

## Properties

### eventObservables$

eventObservables$: Record<string, Observable<any>> = {}

- Defined in lib/socket-io.service.ts:20

### ioSocket

ioSocket: any

- Defined in lib/socket-io.service.ts:21

### subscribersCounter

subscribersCounter: Record<string, number> = {}

- Defined in lib/socket-io.service.ts:19

## Methods

### connect

- connect(): any

- #### Returns any

  - Defined in lib/socket-io.service.ts:46

### disconnect

- disconnect(_close?): any

- #### Parameters

  - `Optional` _close: any

  #### Returns any

  - Defined in lib/socket-io.service.ts:50

### emit

- emit(_eventName, ..._args): any

- #### Parameters

  - _eventName: string
  - `Rest` ..._args: any[]

  #### Returns any

  - Defined in lib/socket-io.service.ts:54

### fromEvent

- fromEvent<T>(eventName): Observable<T>

- #### Type Parameters

  - T

  #### Parameters

  - eventName: string

  #### Returns Observable<T>

  - Defined in lib/socket-io.service.ts:66

### fromOneTimeEvent

- fromOneTimeEvent<T>(eventName): Promise<T>

- #### Type Parameters

  - T

  #### Parameters

  - eventName: string

  #### Returns Promise<T>

  - Defined in lib/socket-io.service.ts:90

### of

- of(namespace): void

- #### Parameters

  - namespace: string

  #### Returns void

  - Defined in lib/socket-io.service.ts:34

### on

- on<T>(eventName, callback): void

- #### Type Parameters

  - T

  #### Parameters

  - eventName: string
  - callback: ((data) => void)
    - - (data): void

      - #### Parameters

        - data: T

        #### Returns void

  - Defined in lib/socket-io.service.ts:38

### once

- once<T>(eventName, callback): void

- #### Type Parameters

  - T

  #### Parameters

  - eventName: string
  - callback: ((data) => void)
    - - (data): void

      - #### Parameters

        - data: T

        #### Returns void

  - Defined in lib/socket-io.service.ts:42

### removeAllListeners

- removeAllListeners(_eventName?): any

- #### Parameters

  - `Optional` _eventName: string

  #### Returns any

  - Defined in lib/socket-io.service.ts:62

### removeListener

- removeListener(_eventName, _callback?): any

- #### Parameters

  - _eventName: string
  - `Optional` _callback: (() => void)
    - - (): void

      - #### Returns void

  #### Returns any

  - Defined in lib/socket-io.service.ts:58