-
Notifications
You must be signed in to change notification settings - Fork 142
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
Find a way for the app to work on the browser #212
Comments
Recently they added a new constructor that will handle the differences grpc_or_grpcweb
|
I will do it |
Sure To quote other developer
So if I understand correctly you don't need to touch the client side as the gRPC package will do all the work for you, and you will need to implement the server side in the Hub but do your own research about it as I am not sure of it. |
Last update of grpc package version 3.0.1
Will update the package shortly. |
Hi @chena-1 I am removing you from Assignees but your pr will still be merged if it will be accepted Thanks |
The app is using gRPC to talk to the Hub.
For on going communication we are opening sockets and streaming data both ways, like turn on the light (app to hub) and light got turned on (hub to app).
They aren't new requests each time, the connection is being kept open and data is transfer between the devices.
If I understand correctly browsers does not support regular
sockets
like we use, they supportweb-sockets
that is different protocol.At first glans gRPC does not support browser


but
So my guess is that Sockets are not supported on the browser and only websockets.
gRPC package have
package:grpc/grpc_web.dart
for web, more research is needed.See also flutter web-sockets doc.
Another option less favorable is to do get requests for state and changes from the Hub to the app each interval and send put messages for changes from the app to the Hub only when needed.
This is less good because it will create a lot of traffic in the network and will require more complicated code or sending all the data each time.
The text was updated successfully, but these errors were encountered: