Cannot create websocket gateway - can you help, please?

I am trying to set up websockets, but the extension isn’t registering itself - or something. Websockets is not showing up as a gateway type: 08.19.2019-13.58.07

I’ve tried uninstalling and reinstalling with no luck. What should I do from here?

Websockets in Lucee do not work through event gateways. Please see the wiki on github. Home · isapir/lucee-websocket Wiki · GitHub

Welcome back!

Gotcha. I’ll take a deeper look this afternoon. The video (original version I guess) said it was done through event gateways, and honestly that seems like the best way to do it. It looks like the current method requires a manual reregister after a restart which makes it less useful for a production solution.

I don’t think the websocket extension was ever built using event gateways. I’ve used the extension from the first version, and it’s always been done this way. I will say, however, that there are problems with the extension that are yet to be fixed. Specifically the one that is most problematic (for me at least), is this one: Null sessionScope argument being sent to onOpen Listener Component callback · Issue #10 · isapir/lucee-websocket · GitHub. I assume @isapir would be available to dig into it more with some sort of bounty or private contracting agreement.

I ran into the same issues trying to get the extension to work. A problem is also that the documentation is inconsistent.

Getting Started · isapir/lucee-websocket Wiki · GitHub and the related video suggest that you just need to install the extension via the Lucee Admin and you’re good to go. Though the README.md of the project claims that you additionally need to edit the web.xml. Websocket gateway :: Lucee Documentation, on the other hand, asks to create a WebSocket gateway after installing the extension, as mentioned by @Daemach.

And it looks like all three documentations are written by @isapir. Unfortunately, none of those three options work for me. So it would be fantastic to get some proper installation instructions.

(Sidenote: The Lucee Admin claims that version 1.1.3.1 is newer than 2.0.3, for some reason.)

Sebastian

You definitely do not need to create an Event Gateway in order to use the websocket extension.

Some effort was made by @psarin to improve the documentation for the extension, but unfortunately it has never been merged…

1 Like

thanks for the reminder, I have privately pinged @isapir to review that PR

2 Likes

Thank you for the quick feedback! I’ll see if I can get it to run with the updated instructions. I’ll come back to you. (Though it’ll take a bit as our sysadmin is currently on PTO).

Sebastian