Search
Preparing search index...
The search index is not available
Sociably
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
Sociably
websocket/client
WebSocketClient
Class WebSocketClient<User, Value, Credential>
Type parameters
User
:
null
|
SociablyUser
=
null
Value
:
EventValue
=
EventValue
Credential =
null
Hierarchy
ClientEmitter
<
WebSocketClientContext
<
User
,
Value
>
>
WebSocketClient
Index
Constructors
constructor
Accessors
channel
is
Closed
is
Connected
user
Methods
_emit
Error
_emit
Event
close
on
Error
on
Event
remove
Error
Listener
remove
Event
Listener
send
Constructors
constructor
new
Web
Socket
Client
<
User
,
Value
,
Credential
>
(
__namedParameters
?:
ClientOptions
<
User
,
Credential
>
)
:
WebSocketClient
<
User
,
Value
,
Credential
>
Type parameters
User
:
null
|
SociablyUser
=
null
Value
:
EventValue
<
string
,
string
,
any
>
=
EventValue
<
string
,
string
,
any
>
Credential =
null
Parameters
__namedParameters:
ClientOptions
<
User
,
Credential
>
= {}
Returns
WebSocketClient
<
User
,
Value
,
Credential
>
Accessors
channel
get
channel
(
)
:
null
|
WebSocketConnection
Returns
null
|
WebSocketConnection
is
Closed
get
isClosed
(
)
:
boolean
Returns
boolean
is
Connected
get
isConnected
(
)
:
boolean
Returns
boolean
user
get
user
(
)
:
null
|
User
Returns
null
|
User
Methods
Protected
_emit
Error
_emit
Error
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Protected
_emit
Event
_emit
Event
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
:
void
Parameters
ctx:
WebSocketClientContext
<
User
,
Value
>
Returns
void
close
close
(
code
?:
number
, reason
?:
string
)
:
void
Parameters
Optional
code:
number
Optional
reason:
string
Returns
void
on
Error
on
Error
(
listener
:
(
err
:
Error
)
=>
void
)
:
void
Parameters
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
void
on
Event
on
Event
(
listener
:
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
=>
void
)
:
void
Parameters
listener:
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
=>
void
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
:
void
Parameters
ctx:
WebSocketClientContext
<
User
,
Value
>
Returns
void
Returns
void
remove
Error
Listener
remove
Error
Listener
(
listener
:
(
err
:
Error
)
=>
void
)
:
boolean
Parameters
listener:
(
err
:
Error
)
=>
void
(
err
:
Error
)
:
void
Parameters
err:
Error
Returns
void
Returns
boolean
remove
Event
Listener
remove
Event
Listener
(
listener
:
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
=>
void
)
:
boolean
Parameters
listener:
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
=>
void
(
ctx
:
WebSocketClientContext
<
User
,
Value
>
)
:
void
Parameters
ctx:
WebSocketClientContext
<
User
,
Value
>
Returns
void
Returns
boolean
send
send
(
content
:
EventInput
|
EventInput
[]
)
:
Promise
<
void
>
Parameters
content:
EventInput
|
EventInput
[]
Returns
Promise
<
void
>
Modules
auth
core
create-
app
dev-
tools
dialogflow
http
line
messenger
next
redis-
state
script
stream
telegram
twitter
websocket
webview
Web
Socket
Client
constructor
channel
is
Closed
is
Connected
user
_emit
Error
_emit
Event
close
on
Error
on
Event
remove
Error
Listener
remove
Event
Listener
send
Generated using
TypeDoc