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

Support establishing a WebSocket connection from plugins/scripts #2068

Open
trygveaa opened this issue Feb 4, 2024 · 0 comments
Open

Support establishing a WebSocket connection from plugins/scripts #2068

trygveaa opened this issue Feb 4, 2024 · 0 comments
Labels
feature New feature request

Comments

@trygveaa
Copy link
Contributor

trygveaa commented Feb 4, 2024

Feature description

It would be useful to have an API function which establishes a WebSocket connection and allows you to send and receive data over it. So it would take a URL to connect to, probably a timeout value, the proxy to use (or use the proxy defined by weechat.network.proxy_curl). For my use case I would also need to specify the cookies sent. Being able to specify any header, rather than just cookies could be useful too.

The callback for receiving data and the function for sending data should handle TLS and compression (if used) transparently. There should also be a way to close the connection, and there should be a callback for when the connection is lost or closed from the server side.

Maybe it should also be possible to specify how often pings should be sent or a way to send ping manually. Answering to pings from the server should be handled transparently I think.

@trygveaa trygveaa added the feature New feature request label Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request
Projects
None yet
Development

No branches or pull requests

1 participant