Open amos-lsl opened 11 months ago
Simple add a []byte
parameter to the event handler should be enough.
type barType struct {
Text string `json:"text"`
Data []byte `json:"data"`
}
server.OnEvent("/", "bar", func(s socketio.Conn, payload *barType) string {
text := payload.Text
data := payload.Data
fmt.Println(text, data)
return fmt.Sprintf("Ack of bar %s %s", text, data)
})
how to receive binary message?