Search
Preparing search index...
The search index is not available
@nestjs/microservices
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
ClientTCP
Class ClientTCP
Hierarchy
ClientProxy
ClientTCP
Index
Constructors
constructor
Properties
connection
deserializer
host
is
Connected
logger
port
routing
Map
serializer
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
initialize
Deserializer
initialize
Serializer
normalize
Pattern
publish
send
Constructors
constructor
new
ClientTCP
(
options
:
TcpClientOptions
[
"options"
]
)
:
ClientTCP
Parameters
options:
TcpClientOptions
[
"options"
]
Returns
ClientTCP
Properties
Protected
connection
connection
:
Promise
<
any
>
Protected
deserializer
deserializer
:
ProducerDeserializer
Private
Readonly
host
host
:
string
Private
is
Connected
is
Connected
:
boolean
= false
Private
Readonly
logger
logger
:
Logger
= new Logger(ClientTCP.name)
Private
Readonly
port
port
:
number
Protected
routing
Map
routing
Map
:
Map
<
string
,
Function
>
= new Map<string, Function>()
Protected
serializer
serializer
:
ProducerSerializer
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
>
)
:
(
packet
:
WritePacket
)
=>
void
Type parameters
T
Parameters
observer:
Observer
<
T
>
Returns
(
packet
:
WritePacket
)
=>
void
(
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 =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Protected
get
Options
Prop
get
Options
Prop<T, K>
(
obj
:
T
, prop
:
K
, defaultValue
?:
T
[
K
]
)
:
T[K]
Type parameters
T
:
ClientOptions
[
"options"
]
K
:
keyof
T
Parameters
obj:
T
prop:
K
Default value
defaultValue:
T
[
K
]
= undefined
Returns
T[K]
handle
Close
handle
Close
(
)
:
void
Returns
void
handle
Error
handle
Error
(
err
:
any
)
:
void
Parameters
err:
any
Returns
void
handle
Response
handle
Response
(
buffer
:
unknown
)
:
void
Parameters
buffer:
unknown
Returns
void
Protected
initialize
Deserializer
initialize
Deserializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
Protected
initialize
Serializer
initialize
Serializer
(
options
:
ClientOptions
[
"options"
]
)
:
void
Parameters
options:
ClientOptions
[
"options"
]
Returns
void
Protected
normalize
Pattern
normalize
Pattern
(
pattern
:
MsPattern
)
:
string
Parameters
pattern:
MsPattern
Returns
string
Protected
publish
publish
(
partialPacket
:
ReadPacket
, callback
:
(
packet
:
WritePacket
)
=>
any
)
:
Function
Parameters
partialPacket:
ReadPacket
callback:
(
packet
:
WritePacket
)
=>
any
(
packet
:
WritePacket
)
:
any
Parameters
packet:
WritePacket
Returns
any
Returns
Function
send
send<TResult, TInput>
(
pattern
:
any
, data
:
TInput
)
:
Observable
<
TResult
>
Type parameters
TResult =
any
TInput =
any
Parameters
pattern:
any
data:
TInput
Returns
Observable
<
TResult
>
Globals
ClientTCP
constructor
connection
deserializer
host
is
Connected
logger
port
routing
Map
serializer
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
initialize
Deserializer
initialize
Serializer
normalize
Pattern
publish
send
Generated using
TypeDoc