1
Vote

Bad detection for encoding

description

Hi, in this method, you only take ZRLE_ENCODING in account, but in my case, Encodings array doesnt contain ZRLE (noVNC client doesnt support it). It should tried to find it, and then iterate over client array and take first best match.
   public Encoding GetPreferredEncoding()
        {
            Encoding prefEnc = Encoding.ZRLE_ENCODING;
            try
            {
                for (int i = 0; i < Encodings.Length; i++)  
                       if (((Encoding)Encodings[i]) == prefEnc)  return prefEnc;
            }
            catch
            {
                prefEnc = Encoding.ZLIB_ENCODING;
            }
            return prefEnc;
        } 

comments