hirundo icon indicating copy to clipboard operation
hirundo copied to clipboard

Stateful Websockets

Open dspiteself opened this issue 1 year ago • 1 comments

I am porting code where I need stateful websockets that are initialized on http upgrade. I made a hack to accomplish that end on my fork

In my fork I just created an atom in the supplier and passed it to all the listener methods when The listener is has the key :stateful set to something truthy. I found Helidon very cumbersome to to work with on this regard and would love your advice on a cleaner way to add this functionality that could be upstreamed.

dspiteself avatar Apr 30 '24 19:04 dspiteself

Hi,

We already use a "supplied" listener, so I guess I could simply abstract away the listener construction (via say a protocol) and optionally let the user pass a "listenable" which could then hold state if desired. I ll have a look at this later today.

mpenet avatar May 01 '24 07:05 mpenet