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

Rewriting mechanic #447

Open
TuzelKO opened this issue Jul 2, 2024 · 1 comment
Open

Rewriting mechanic #447

TuzelKO opened this issue Jul 2, 2024 · 1 comment

Comments

@TuzelKO
Copy link

TuzelKO commented Jul 2, 2024

Hello! It would be useful to implement a rewrite mechanism, thanks to which different addresses could be passed to a single entry point, as does e.g. Nginx.

For example, I have several addresses: ws://ip:port/category1/action1, ws://ip:port/category1/action2, ws://ip:port/category2/action1... I would like all these connections to be poured into one script, and the path to be passed, for example, as a launch argument, so that the script’s internal router can decide what to do.

This function will allow you to easily integrate many PHP frameworks with WebSocketD.You can also make the setting with one argument at startup (--url-to-argv or --url-rewriting). The launched script will in turn receive this address as the first argument (php my-ws-script.php "/path/from/address")

@mathieu-aubin
Copy link

nothing nginx could potentially accomplish? Maybe?
https://nginx.org/en/docs/http/websocket.html on websockets but combined with nginx capabilities...

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

No branches or pull requests

2 participants