code refactoring, switch to rxjs websocket wrapper
This commit is contained in:
@@ -11,6 +11,7 @@ import "time"
|
||||
//
|
||||
// Debounce emits a string from the source channel only after a particular
|
||||
// time span determined a Go Interval
|
||||
//
|
||||
// --A--B--CD--EFG-------|>
|
||||
//
|
||||
// -t-> |>
|
||||
|
||||
@@ -34,6 +34,10 @@ func RunBlocking(port int, frontend fs.FS) {
|
||||
// RPC handlers
|
||||
// websocket
|
||||
app.Get("/ws-rpc", websocket.New(func(c *websocket.Conn) {
|
||||
c.WriteMessage(websocket.TextMessage, []byte(`{
|
||||
"status": "connected"
|
||||
}`))
|
||||
|
||||
for {
|
||||
mtype, reader, err := c.NextReader()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user