Providers
SocketSubscriber
A SocketSubscriber uses a socket transport to handle events and should use _emit to manage the events.
- A sub-class MUST call the
_start()
method once connected - A sub-class MUST override the
_write(string)
method - A sub-class MUST call
_processMessage(string)
for each message
Extended by
Implements
Constructors
new SocketSubscriber()
Creates a new SocketSubscriber attached to provider
listening to filter
.
Parameters
Parameter | Type | Description |
---|---|---|
provider | SocketProvider | The socket provider. |
filter | any [] | The filter. |
zone | Zone | - |
Returns
Source
providers/provider-socket.ts:63
Accessors
filter
The filter.
Returns
any
[]
Source
providers/provider-socket.ts:46
Methods
_emit()
Sub-classes must override this to emit the events on the provider.
Parameters
Parameter | Type | Description |
---|---|---|
provider | SocketProvider | The socket provider. |
message | any | The message to emit. |
Returns
Promise
<void
>
Abstract
Source
providers/provider-socket.ts:151
pause()
Pause the subscriber.
Parameters
Parameter | Type | Description |
---|---|---|
dropWhilePaused ? | boolean | Whether to drop logs while paused. |
Returns
void
Implementation of
Source
providers/provider-socket.ts:98
resume()
Resume the subscriber.
Returns
void
Implementation of
Source
providers/provider-socket.ts:111
start()
Start the subscriber.
Returns
void
Implementation of
Source
providers/provider-socket.ts:76
stop()
Stop the subscriber.
Returns
void
Implementation of
Source
Was this page helpful?