connectUser
Initializes ChatClient for a specific user. The tokenProvider implementation is used for the initial token, and it's also invoked whenever the user's token has expired, to fetch a new token.
This method performs required operations before connecting with the Stream API. Moreover, it warms up the connection, sets up notifications, and connects to the socket.
Check out docs for more info about tokens. Also visit this site to find more about Json Web Token standard. You can generate the JWT token on using one of the available libraries or use our manual tool for token generation.
Return
Executable Call responsible for connecting the user.
Parameters
The user to set.
A TokenProvider implementation.
The timeout in milliseconds to be waiting until the connection is established.
See also
Initializes ChatClient for a specific user using the given user token. Check ChatClient.connectUser with TokenProvider parameter for advanced use cases.
Return
Executable Call responsible for connecting the user.
Parameters
Instance of User type.
Instance of JWT token.