How to use WsSessionState in Actix websocket client?

I've tried a lot of methods, but they don't work.

You're probably going to need to provide more details in order to get meaningful responses.

can`t find state function in websocket client

what do your extern and use statements look like? The code for the WS chat example includes the comment

/// This is our websocket route state, this state is shared with all route
/// instances via HttpContext::state()

You could see if adding the HttpContext:: path to your call of the state() function helps.

1 Like

Thank you for your reply. I'll try it.