@terascope/teraslice-messaging / messenger/client / Client
Class: Client
Extends
Extended by
Constructors
new Client()
new Client(
opts
,_connectTimeout
?):Client
Parameters
Parameter | Type |
---|---|
opts | ClientOptions |
_connectTimeout ? | number |
Returns
Overrides
Source
Properties
actionTimeout
protected
actionTimeout:number
Inherited from
Source
available
available:
boolean
Source
clientId
readonly
clientId:string
Source
clientType
readonly
clientType:string
Source
closed
closed:
boolean
=false
Inherited from
Source
connectTimeout
readonly
connectTimeout:number
Source
hostUrl
readonly
hostUrl:string
Source
logger
protected
logger:Logger
Inherited from
Source
networkLatencyBuffer
protected
networkLatencyBuffer:number
Inherited from
Source
ready
ready:
boolean
Source
serverName
readonly
serverName:string
Source
serverShutdown
protected
serverShutdown:boolean
Source
socket
readonly
socket:Socket
Source
Methods
close()
close():
void
Returns
void
Inherited from
Source
connect()
connect():
Promise
<void
>
Returns
Promise
<void
>
Source
emit()
emit(
eventName
,msg
):void
Parameters
Parameter | Type |
---|---|
eventName | string |
msg | ClientEventMessage |
Returns
void
Overrides
Source
forceReconnect()
forceReconnect():
Promise
<void
>
Returns
Promise
<void
>
Source
getTimeout()
getTimeout(
timeout
?):number
Parameters
Parameter | Type |
---|---|
timeout ? | number |
Returns
number
Inherited from
Source
getTimeoutWithMax()
getTimeoutWithMax(
maxTimeout
):number
Parameters
Parameter | Type |
---|---|
maxTimeout | number |
Returns
number
Inherited from
Source
handleResponse()
protected
handleResponse(socket
,eventName
,fn
):void
Parameters
Parameter | Type |
---|---|
socket | SocketEmitter |
eventName | string |
fn | MessageHandler |
Returns
void