Factory class used to create derived EncodedRectangle objects at runtime based on data sent by VNC Server.
Ejemplo n.º 1
0
        /// <summary>
        /// Finish setting-up protocol with VNC Host.  Should be called after Connect and Authenticate (if password required).
        /// </summary>
        public void Initialize()
        {
            // Finish initializing protocol with host
            rfb.WriteClientInitialisation(false);
            buffer = rfb.ReadServerInit();
            rfb.WriteSetPixelFormat(buffer);                    // just use the server's framebuffer format

            rfb.WriteSetEncodings(new uint[] { RfbProtocol.ZRLE_ENCODING,
                                               RfbProtocol.HEXTILE_ENCODING,
                                               //	RfbProtocol.CORRE_ENCODING, // CoRRE is buggy in some hosts, so don't bother using
                                               RfbProtocol.RRE_ENCODING,
                                               RfbProtocol.COPYRECT_ENCODING,
                                               RfbProtocol.RAW_ENCODING });

            // Create an EncodedRectangleFactory so that EncodedRectangles can be built according to set pixel layout
            factory = new EncodedRectangleFactory(rfb, buffer);
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Finish setting-up protocol with VNC Host.  Should be called after Connect and Authenticate (if password required).
		/// </summary>
		public void Initialize()
		{
			// Finish initializing protocol with host
			rfb.WriteClientInitialisation(false);
			buffer = rfb.ReadServerInit();
			rfb.WriteSetPixelFormat(buffer);	// just use the server's framebuffer format

			rfb.WriteSetEncodings(new uint[] {	RfbProtocol.ZRLE_ENCODING,
			                                    RfbProtocol.HEXTILE_ENCODING, 
											//	RfbProtocol.CORRE_ENCODING, // CoRRE is buggy in some hosts, so don't bother using
												RfbProtocol.RRE_ENCODING,
												RfbProtocol.COPYRECT_ENCODING,
												RfbProtocol.RAW_ENCODING });
			
			// Create an EncodedRectangleFactory so that EncodedRectangles can be built according to set pixel layout
			factory = new EncodedRectangleFactory(rfb, buffer);
		}