async_stomp::client

Function connect

Source
pub async fn connect(
    server: impl ToSocketAddrs,
    virtualhost: impl Into<String>,
    login: Option<String>,
    passcode: Option<String>,
) -> Result<ClientTransport, Error>
Expand description

Connect to a STOMP server via TCP, including the connection handshake. If successful, returns a tuple of a message stream and a sender, which may be used to receive and send messages respectively.

virtualhost If no specific virtualhost is desired, it is recommended to set this to the same as the host name that the socket was established against (i.e, the same as the server address).