Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom websocket channels not working #630

Open
AndiLeni opened this issue Mar 10, 2023 · 7 comments
Open

Custom websocket channels not working #630

AndiLeni opened this issue Mar 10, 2023 · 7 comments
Assignees
Labels

Comments

@AndiLeni
Copy link

I tried setting up custom websocket channels as described in the dokumentation:

I set up my server as follows:
index.jl contains

using Genie, Genie.Router, Genie.Assets

Genie.config.websockets_server = true # enable the websockets server

route("/") do
    Assets.channels_support()
end

channel("/foo/bar") do
    # process request
end

up()

but if I run this in a repl via include("index.jl") and then run Genie.WebChannels.channels() I get this output:

julia> Genie.WebChannels.channels()
1-element Vector{String}:
 "____"

And it is cleary missing the /foo/bar websocket channel.

@AbhimanyuAryan
Copy link
Member

@AndiLeni what version of Genie? Can you please post versioninfo()?

@AndiLeni
Copy link
Author

Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 12 virtual cores

package status is:

  Genie v5.15.0
  GenieFramework v1.9.0

@AbhimanyuAryan
Copy link
Member

I don't know why it doesn't work. Are you using 4xunderscore? ____ I am able to pass the messages just fine

websocket

@AndiLeni
Copy link
Author

The default channel ____ works fine.
But this is not the issue.
Custom channels do not work as expected.

If there is only one channel possible, what is the channel command used for in the documentation?

@essenciary
Copy link
Member

It should work - used to work for sure. I'll need to check and debug.

@AbhimanyuAryan
Copy link
Member

@AndiLeni can you record a gif or video and show what do you expect? I tested /foo/bar and the message was passed as expected

@essenciary
Copy link
Member

To review before v6 release in case breaking changes are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants