Exemple #1
0
 /// <summary>
 /// Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
 /// </summary>
 /// <param name="buffer">A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.</param>
 public void WriteSetPixelFormat(Framebuffer buffer)
 {
     writer.Write(SET_PIXEL_FORMAT);
     WritePadding(3);
     writer.Write(buffer.ToPixelFormat());                       // 16-byte Pixel Format
     writer.Flush();
 }
Exemple #2
0
        /// <summary>
        /// Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
        /// </summary>
        /// <param name="buffer">A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.</param>
        public void WriteSetPixelFormat(Framebuffer buffer)
        {
            byte[] buff = new byte[20];

            // Build up the packet
            buff[0] = (byte)ClientServerMessageType.SetPixelFormat;
            buff[1] = 0x00;
            buff[2] = 0x00;
            buff[3] = 0x00;
            buffer.ToPixelFormat().CopyTo(buff, 4);                     // 16-byte Pixel Format
            writer.Write(buff);
            writer.Flush();
        }
Exemple #3
0
        /// <summary>
        /// Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
        /// </summary>
        /// <param name="buffer">A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.</param>
        public void WriteSetPixelFormat(Framebuffer buffer)
        {
            byte[] buff = new byte[20];

            // Build up the packet
            buff[0] = SET_PIXEL_FORMAT;
            buff[1] = 0x00;
            buff[2] = 0x00;
            buff[3] = 0x00;
            buffer.ToPixelFormat().CopyTo(buff, 4);                     // 16-byte Pixel Format
            writer.Write(buff);
            writer.Flush();
        }
Exemple #4
0
        /// <summary>
        /// Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
        /// </summary>
        /// <param name="buffer">A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.</param>
        public async Task WriteSetPixelFormat(Framebuffer buffer, CancellationToken ct = default)
        {
            byte[] buff = new byte[20];

            // Build up the packet
            buff[0] = SET_PIXEL_FORMAT;
            buff[1] = 0x00;
            buff[2] = 0x00;
            buff[3] = 0x00;
            buffer.ToPixelFormat().CopyTo(buff, 4);                     // 16-byte Pixel Format
            await writer.WriteAsync(buff, ct).ConfigureAwait(false);

            await writer.FlushAsync(ct).ConfigureAwait(false);
        }
Exemple #5
0
		/// <summary>
		/// Sends the format to be used by the server when sending Framebuffer Updates. See RFB Doc v. 3.8 section 6.3.1.
		/// </summary>
		/// <param name="buffer">A Framebuffer telling the server how to encode pixel data. Typically this will be the same one sent by the server during initialization.</param>
		public void WriteSetPixelFormat(Framebuffer buffer)
		{
			writer.Write(SET_PIXEL_FORMAT);
			WritePadding(3);
			writer.Write(buffer.ToPixelFormat());		// 16-byte Pixel Format
			writer.Flush();
		}