code: func (w *WebSockWrapper) Write(data []byte) (n int, err error) {
  	n = len(data)
  	if w.mode == WebSocketBinaryMode {
  		// binary send:
  		err = websocket.Message.Send(w.ws, data)
  		// text send:
  	} else {
  		var utf8 string
  		utf8, err = w.encoder.String(string(data))
  		err = websocket.Message.Send(w.ws, utf8)
  	}
  	if err != nil {
  		n = 0
  	}
  	return n, err
  }
docs: // Write implements io.WriteCloser for WebSockWriter (that's the reason we're
  // wrapping the websocket)
  //
  // It replaces raw Write() with "Message.Send()"