(eventType, data, options = {})
| 449 | } |
| 450 | |
| 451 | async emit(eventType, data, options = {}) { |
| 452 | const correlationId = |
| 453 | normalizeCorrelationId(options?.correlationId) || createCorrelationId("emit"); |
| 454 | const payload = this.buildPayload(data); |
| 455 | payload.correlationId = correlationId; |
| 456 | |
| 457 | this.debugLog("emit", { |
| 458 | eventType, |
| 459 | correlationId, |
| 460 | }); |
| 461 | this.ensurePayloadSize(payload); |
| 462 | await this.connect(); |
| 463 | if (!this.isConnected()) { |
| 464 | throw new Error("Not connected"); |
| 465 | } |
| 466 | this.socket.emit(eventType, payload); |
| 467 | } |
| 468 | |
| 469 | async request(eventType, data, options = {}) { |
| 470 | const correlationId = |
no test coverage detected