mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
bugfix(microservices): let use unicode characters in TCP Microservice messages
add own json-socket implementation https://github.com/nestjs/nest/issues/1734
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Logger } from '@nestjs/common';
|
||||
import * as JsonSocket from 'json-socket';
|
||||
import * as net from 'net';
|
||||
import { share, tap } from 'rxjs/operators';
|
||||
import {
|
||||
@@ -14,6 +13,7 @@ import {
|
||||
ClientOptions,
|
||||
TcpClientOptions,
|
||||
} from '../interfaces/client-metadata.interface';
|
||||
import { JsonSocket } from '../json-socket';
|
||||
import { ClientProxy } from './client-proxy';
|
||||
import { ECONNREFUSED } from './constants';
|
||||
|
||||
@@ -42,7 +42,7 @@ export class ClientTCP extends ClientProxy {
|
||||
this.socket = this.createSocket();
|
||||
this.bindEvents(this.socket);
|
||||
|
||||
const source$ = this.connect$(this.socket._socket).pipe(
|
||||
const source$ = this.connect$(this.socket.netSocket).pipe(
|
||||
tap(() => {
|
||||
this.isConnected = true;
|
||||
this.socket.on(MESSAGE_EVENT, (buffer: WritePacket & PacketId) =>
|
||||
|
||||
Reference in New Issue
Block a user