OpenBCI_WIFI
                                
                                 OpenBCI_WIFI copied to clipboard
                                
                                    OpenBCI_WIFI copied to clipboard
                            
                            
                            
                        Add websocket server
Good way to stream JSON to web browser!
Checkout this project: https://github.com/AdySan/ESPSocket/blob/master/ESPSocket/ESPSocket.ino
Socket.io client https://gist.github.com/alexcastillo/e3aca7ba0a3510a4c340b34faeb6d54c
Wensockets use TCP so this could be a good thing to implement the transfer protocol in because of the minimum framing websockets use for streaming. Seems better then raw TCP to be frank. TCP in its raw form fragments packers like crazy and not having a header, a minimum one, is a headache for developers.
GRPC (TCP only right now) might be worth exploring for you too. I want to say for what you're doing that'll work smoother. There's more documentation/maturity with websockets.
Is this GRPC? Link?
Yeah and I take that back already, just realized you're going to browsers (vs just bidirectional stream)
We can go to node, python, Java, anything, does this run on ESP8266?
I don't see why it wouldn't. I've got a mature node client if you do, hit me up. GRPC works like databases a little where you depending on what you're doing you might want a connection pool. I use it on an API server and treating it like REST will def break things. :D
remember the first time we saw promises and were like what the shit is this? :D
FYI, I knew drone.io switched from websockets to grpc but didn't know why. Donno what half of this means but might be useful to you :P
replaced websockets with server sent events because http/2 does not support websockets, and version 0.8 begins taking advantage of http/2 connections for grpc and includes experimental quic support.
https://github.com/drone/drone/issues/2159
Is this ticket still valid? I will look into working on it if so