* Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server.
()
| 23 | * Creates a pair of linked in-memory transports that can communicate with each other. One should be passed to a Client and one to a Server. |
| 24 | */ |
| 25 | static createLinkedPair(): [InMemoryTransport, InMemoryTransport] { |
| 26 | const clientTransport = new InMemoryTransport(); |
| 27 | const serverTransport = new InMemoryTransport(); |
| 28 | clientTransport._otherTransport = serverTransport; |
| 29 | serverTransport._otherTransport = clientTransport; |
| 30 | return [clientTransport, serverTransport]; |
| 31 | } |
| 32 | |
| 33 | async start(): Promise<void> { |
| 34 | // Process any messages that were queued before start was called |
no outgoing calls