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

websockets #45

Open
davidmoshal opened this issue Oct 24, 2021 · 6 comments
Open

websockets #45

davidmoshal opened this issue Oct 24, 2021 · 6 comments

Comments

@davidmoshal
Copy link

Thanks for the great library.
Wondering if websockets are possible?

@belyalov
Copy link
Owner

Hey! )
Thanks for feedback 👍🏻

No, I haven't added web sockets at that time, simply didn't need that few years ago.

But you're warmly welcomed to contribute it! :)

Best

@davidmoshal
Copy link
Author

davidmoshal commented Dec 21, 2021

I might just do that!
The websocket wire protocol is implemented in other micropython libraries, so I could start with that.
Though in all honesty I'm really a Typescript/Kotlin guy, my knowledge of python isn't great.

This would probably be where I'd start:

@belyalov
Copy link
Owner

That would be great ))
Went through the link - does not seem to be complicated..)

@davidmoshal
Copy link
Author

@belyalov : ok, I'll try to tackle it over the weekend.

Dave

@davidmoshal
Copy link
Author

taking a look at this today.
I think we want to implement socket.io too, for automatic reconnection, topics, etc.

https://github.com/danni/uwebsockets/blob/esp8266/examples/socketio_client.py

So that we can have an api like this:

@socketio.on('topic1')
def on_topic1(message):
    print("message", message)

@socketio.on('topic2')
def on_topic2(message):
    print("alert", message)

@akshaydusane93
Copy link

akshaydusane93 commented Mar 11, 2022

Are websockets supporting now ?

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

3 participants