code: func (conn *WebsocketConnection) Write(b []byte) (n int, err error) {
  	conn.writeMutex.Lock()
  	defer conn.writeMutex.Unlock()
  
  	// allocate a writer
  	var writer io.WriteCloser
  	writer, err = conn.ws.NextWriter(websocket.BinaryMessage)
  	if err != nil {
  		return
  	}
  
  	// write
  	n, err = writer.Write(b)
  	if err != nil {
  		return
  	}
  
  	// close it
  	err = writer.Close()
  	return
  }
docs: // Writes the given bytes as a binary opcode segment onto the websocket.