Closed ahczbhht1989 closed 3 years ago
Please take a look at the PubSubMetadata
trait.
You need to either customize the Metadata
(instead of using the default Arc<Session>
) and there you can hold any per-user data (make sure to implement correct Drop
), or you need to associate some id to every user and then store the per-user data externally.
When I create a jsonrpc server on websocket channel, code as below
and I have state in my handler,I want to have different state with different client(each client have it's own handler). The reason is code
But I find when connect to server from different client, the state is current state in my XXX So How can I handle this.