(data []byte)
| 330 | } |
| 331 | |
| 332 | func (w *wsResponseWriter) SendText(data []byte) error { |
| 333 | w.mu.Lock() |
| 334 | defer w.mu.Unlock() |
| 335 | if w.completed { |
| 336 | return nil |
| 337 | } |
| 338 | return w.sink.writeText(data) |
| 339 | } |
| 340 | |
| 341 | func (w *wsResponseWriter) SendBinary(data []byte) error { |
| 342 | w.mu.Lock() |