Open labe-me opened 9 years ago
Here's an example:
override def sessionIdGenerator: HttpRequest => Future[String] = {
req =>
val sid = req.uri.query.get("sessionid") match {
case Some(sessionId) => sessionId
case None => UUID.randomUUID.toString
}
Future.successful(sid)
}
Thank you for the reply, I'll try again this solution.
In my former test it looked like the first connected socket (two browser tabs on same sessionId) wasn't receiving messages anymore.
Hello,
Is it possible to have multiple connections using the same sessionId (browser tabs for instance), each connection receiving the same messages ?
If it's not possible how can I pass the HttpRequest cookie SID along the ConnectionContext so I can handle the duplicity from by ActorSubscriber ?
If it is not possible to extends the ConnectionContext may be it is possible to send a custom message from the SocketIOServerWorker.postReceive() to the ActorSubscriber ? How would you do that from client code ?
Best regards Laurent