Function tokio_stomp_2::client::connect[][src]

pub async fn connect(
    address: impl Into<String>,
    login: Option<String>,
    passcode: Option<String>
) -> Result<impl Stream<Item = Result<Message<FromServer>, Error>> + Sink<Message<ToServer>, Error = Error>, Error>

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.