|
|
@ -40,14 +40,14 @@ export abstract class IpcClientService<M extends Microservice = Microservice> ex |
|
|
|
*/ |
|
|
|
public bootIpc(ipc: IPC) { |
|
|
|
// Connect to the server
|
|
|
|
return new Promise<void>((resolve, reject) => { |
|
|
|
return new Promise<void>((resolve, _) => { |
|
|
|
this.rawIpcInstance!.connectTo(this.NAME, this.SOCKET_PATH, () => { |
|
|
|
this.__isConnected = true; |
|
|
|
this.__isConnected = false; |
|
|
|
this.__requestId = 0; |
|
|
|
this.__socket = ipc!.of[this.NAME]; |
|
|
|
this.__socket = <Socket>ipc!.of[this.NAME]; |
|
|
|
this.installEventHandlers(this.__socket!); |
|
|
|
this.installMessageHandlers(); |
|
|
|
resolve(); |
|
|
|
this.__socket!.once("connect", resolve); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|