The type of message to wait for
Optional
filterFn: ((message: Message) => boolean)Optional function to filter messages by additional criteria
Optional timeout in milliseconds (default: 10000)
Promise that resolves with the message payload or rejects with an error
Sends a message to the server and waits for a specific response type
The message to send
The type of response to wait for
Additional options for handling the response
Promise that resolves with the response payload or rejects with an error
Awaits a response for a specific message type