SendText sends the given string as a text message on the WebSocket.
(v string)
| 142 | // SendText sends the given string as a text message |
| 143 | // on the WebSocket. |
| 144 | func (c WebSocket) SendText(v string) (err error) { |
| 145 | defer handleJSError(&err, nil) |
| 146 | c.v.Call("send", v) |
| 147 | return err |
| 148 | } |
| 149 | |
| 150 | // SendBytes sends the given message as a binary message |
| 151 | // on the WebSocket. |