Skip to content

Commit

Permalink
Update ws.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Sagleft committed May 28, 2022
1 parent b22d45b commit 86c927b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ws.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package utopiago

import (
"encoding/json"
"errors"
"fmt"
"log"
Expand Down Expand Up @@ -96,18 +95,19 @@ type WsEventsCallback func(ws WsEvent)
type WsErrorCallback func(err error)

type WsSubscribeTask struct {
Port int
Callback WsEventsCallback // required
ErrCallback WsErrorCallback // required
}

func newWsEvent(jsonRaw string) (WsEvent, error) {
/*func newWsEvent(jsonRaw string) (WsEvent, error) {
event := WsEvent{}
err := json.Unmarshal([]byte(jsonRaw), &event)
if err != nil {
return event, errors.New("failed to decode event json: " + err.Error())
}
return event, nil
}
}*/

// WsSubscribe - connect to websocket & recive messages.
// NOTE: it's blocking method
Expand Down

0 comments on commit 86c927b

Please sign in to comment.