connect
Connects to the given WebSocket url and to the STOMP session, and returns after receiving the CONNECTED frame.
If login and passcode are provided, they are used to connect at STOMP level (after the web socket connection is established).
If customStompConnectHeaders is provided, its content will be included in the CONNECT (or STOMP) frame and might be used by the server for various usages, e.g. Authorization
The host header of the CONNECT (or STOMP) frame can be customized via the host parameter. This header was introduced as mandatory since STOMP 1.1 and defaults to the host of the provided URL. Some old STOMP servers may refuse connections with a host header, in which case you can force it to null to prevent it from being sent.
An additional sessionCoroutineContext can be provided to override the context used for the collection and decoding of the STOMP frames in the created StompSession. By default, the session uses Dispatchers.Default, but it can be overridden here. This is mostly useful to inject a test dispatcher.
Throws
if this method takes longer than the configured timeout (as a whole for both WS connect and STOMP connect)