Search
Preparing search index...
The search index is not available
@nestjs/common
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
ClientTCP
Class ClientTCP
Hierarchy
ClientProxy
ClientTCP
Index
Constructors
constructor
Properties
connection
host
is
Connected
logger
port
routing
Map
socket
Methods
assign
Packet
Id
bind
Events
close
connect
connect$
create
Observer
create
Socket
dispatch
Event
emit
get
Options
Prop
handle
Close
handle
Error
handle
Response
normalize
Pattern
publish
send
Constructors
constructor
new
ClientTCP
(
options
:
any
)
:
ClientTCP
Parameters
options:
any
Returns
ClientTCP
Properties
Protected
connection
connection
:
Promise
<
any
>
Private
host
host
:
string
Private
is
Connected
is
Connected
:
boolean
= false
Private
logger
logger
:
any
= new Logger(ClientTCP.name)
Private
port
port
:
number
Protected
routing
Map
routing
Map
:
any
= new Map<string, Function>()
Private
socket
socket
:
JsonSocket
Methods
Protected
assign
Packet
Id
assign
Packet
Id
(
packet
:
ReadPacket
)
:
ReadPacket
&
PacketId
Parameters
packet:
ReadPacket
Returns
ReadPacket
&
PacketId
bind
Events
bind
Events
(
socket
:
JsonSocket
)
:
void
Parameters
socket:
JsonSocket
Returns
void
close
close
(
)
:
void
Returns
void
connect
connect
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
Protected
connect$
connect$
(
instance
:
any
, errorEvent
?:
string
, connectEvent
?:
string
)
:
Observable
<
any
>
Parameters
instance:
any
Default value
errorEvent:
string
= ERROR_EVENT
Default value
connectEvent:
string
= CONNECT_EVENT
Returns
Observable
<
any
>
Protected
create
Observer
create
Observer<T>
(
observer
:
Observer
<
T
>
)
:
function
Type parameters
T
Parameters
observer:
Observer
<
T
>
Returns
function
(
packet
:
WritePacket
)
:
void
Parameters
packet:
WritePacket
Returns
void
create
Socket
create
Socket
(
)
:
JsonSocket
Returns
JsonSocket
Protected
dispatch
Event
dispatch
Event
(
packet
:
ReadPacket
)
:
Promise
<
any
>
Parameters
packet:
ReadPacket
Returns
Promise
<
any
>
emit
emit<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult
TInput
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Protected
get
Options
Prop
get
Options
Prop<T>
(
obj
:
any
, prop
:
keyof T["options"]
, defaultValue
?:
any
)
:
any
Type parameters
T
:
object
Parameters
obj:
any
prop:
keyof T["options"]
Default value
defaultValue:
any
= undefined
Returns
any
handle
Close
handle
Close
(
)
:
void
Returns
void
handle
Error
handle
Error
(
err
:
any
)
:
void
Parameters
err:
any
Returns
void
handle
Response
handle
Response
(
buffer
:
WritePacket
&
PacketId
)
:
void
Parameters
buffer:
WritePacket
&
PacketId
Returns
void
Protected
normalize
Pattern
normalize
Pattern<T>
(
pattern
:
T
)
:
string
Type parameters
T
Parameters
pattern:
T
Returns
string
Protected
publish
publish
(
partialPacket
:
ReadPacket
, callback
:
function
)
:
Function
Parameters
partialPacket:
ReadPacket
callback:
function
(
packet
:
WritePacket
)
:
any
Parameters
packet:
WritePacket
Returns
any
Returns
Function
send
send<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult
TInput
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Globals
ClientTCP
constructor
connection
host
is
Connected
logger
port
routing
Map
socket
assign
Packet
Id
bind
Events
close
connect
connect$
create
Observer
create
Socket
dispatch
Event
emit
get
Options
Prop
handle
Close
handle
Error
handle
Response
normalize
Pattern
publish
send
Generated using
TypeDoc