/// <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) { lock (lockObj) { writer.Write(SET_PIXEL_FORMAT); WritePadding(3); writer.Write(buffer.ToPixelFormat()); // 16-byte Pixel Format writer.Flush(); } }