void HandleSetEncodings()
        {
            _c.Receive(1);

            int encodingCount  = _c.ReceiveUInt16BE(); VncStream.SanityCheck(encodingCount <= 0x1ff);
            var clientEncoding = new VncEncoding[encodingCount];

            for (int i = 0; i < clientEncoding.Length; i++)
            {
                uint encoding = _c.ReceiveUInt32BE();
                clientEncoding[i] = (VncEncoding)encoding;
            }
            _clientEncoding = clientEncoding;
        }
Exemple #2
0
        internal void HandleSetEncodings()
        {
            this.c.Receive(1);

            int encodingCount = this.c.ReceiveUInt16BE();

            VncStream.SanityCheck(encodingCount <= 0x1ff);
            this.clientEncoding.Clear();

            this.logger?.LogInformation($"The client supports {encodingCount} encodings:");

            for (int i = 0; i < encodingCount; i++)
            {
                var encoding = (VncEncoding)this.c.ReceiveUInt32BE();
                this.clientEncoding.Add(encoding);

                this.logger?.LogInformation($"- {encoding}");
            }

            this.InitFramebufferEncoder();
        }
        internal void HandleSetEncodings()
        {
            this.c.Receive(1);

            int encodingCount = this.c.ReceiveUInt16BE();

            VncStream.SanityCheck(encodingCount <= 0x1ff);
            this.clientEncoding.Clear();

            this.logger?.Log(LogLevel.Info, () => "The client supports {0} encodings:", null, encodingCount);

            for (int i = 0; i < encodingCount; i++)
            {
                var encoding = (VncEncoding)this.c.ReceiveUInt32BE();
                this.clientEncoding.Add(encoding);

                this.logger?.Log(LogLevel.Info, () => "- {0}", null, encoding);
            }

            this.InitFramebufferEncoder();
        }