Robert Jaros
02/25/2020, 1:54 PMwsBefore gives access to a WsHandler object, but it doesn't have attributes (like Context available in before). Is there any way to create an interceptor/filter for websockets and pass custom data to websocket handlers (preferably to just put an attribute to WsContext)?david-wg2
02/25/2020, 2:03 PMdavid-wg2
02/25/2020, 2:04 PMRobert Jaros
02/25/2020, 2:12 PMonConnect handlers? Will both run? In the same order? Will both work on the same WsContext?
app.wsBefore { ws ->
ws.onConnect { ctx ->
ctx.attribute("key", "testValue")
}
}
<http://app.ws|app.ws>("/path") { ws ->
ws.onConnect { ctx ->
val v = ctx.attribute<String>("key")
// will this work ?
}
}david-wg2
02/25/2020, 2:21 PMonConnect in a wsBefore and onMessage in a ws might not (since Jetty has probably killed the upgrade-request by then)Robert Jaros
02/25/2020, 2:24 PMRobert Jaros
02/25/2020, 5:53 PMWsHandler instance shared by all clients?Robert Jaros
02/25/2020, 5:59 PMRobert Jaros
02/25/2020, 6:05 PMtipsy
02/25/2020, 10:27 PMIsthat's a strange way of thinking aboutinstance shared by all clients?WsHandler
tipsy
02/25/2020, 10:28 PMHandler in `get("/") { ... }`` is shared by all request to /tipsy
02/25/2020, 10:29 PM