graph LR
RFB_Protocol_Core["RFB Protocol Core"]
Connection_Security_Handshake["Connection & Security Handshake"]
Session_Initialization["Session Initialization"]
Client_Input_Event_Handling["Client Input Event Handling"]
Server_Display_Clipboard_Updates["Server Display & Clipboard Updates"]
Protocol_Data_Units_PDUs_["Protocol Data Units (PDUs)"]
RFB_Client_Controller["RFB Client Controller"]
Network_Integration_Layer["Network Integration Layer"]
RFB_Protocol_Core -- "orchestrates and initiates" --> Connection_Security_Handshake
Connection_Security_Handshake -- "triggers" --> Session_Initialization
Session_Initialization -- "prepares system for" --> Client_Input_Event_Handling
RFB_Client_Controller -- "interacts with" --> Network_Integration_Layer
RFB_Client_Controller -- "triggers actions in" --> Client_Input_Event_Handling
RFB_Client_Controller -- "requests updates from" --> Server_Display_Clipboard_Updates
Client_Input_Event_Handling -- "creates instances of" --> Protocol_Data_Units_PDUs_
Server_Display_Clipboard_Updates -- "processes" --> Protocol_Data_Units_PDUs_
The feedback provided highlights critical issues regarding the accuracy of source file references and the logical consistency of component relationships, both of which directly impact the clarity and correctness of the architectural documentation and diagrams. Specifically, references to executable scripts or incorrect protocol implementations (RDP instead of RFB) for Client Input Event Handling and Protocol Data Units (PDUs) have been corrected to point to the definitive RFB protocol source code within rdpy/protocol/rfb/rfb.py. Additionally, the relationship between Session Initialization and Client Input Event Handling has been rephrased to accurately reflect that session initialization completes a setup phase, thereby preparing the system for subsequent client input events, rather than directly leading to the sending of preferences by the input handler. These adjustments ensure that the architectural analysis is grounded in the correct implementation details and that the depicted interactions are logically sound, making the output suitable for both detailed documentation and clear visual representation in flow graphs.
The central class that encapsulates the overall state and logic of the RFB protocol. It orchestrates the various phases of the VNC connection, acting as the main state machine and dispatcher for protocol messages.
Related Classes/Methods:
Manages the initial phase of establishing a VNC connection, including protocol version negotiation (recvProtocolVersion), security type negotiation (recvSecurityList, recvSecurityResult), and the client's initial message (sendClientInit).
Related Classes/Methods:
connect:67-73RFB.recvProtocolVersion:256-275RFB.recvSecurityList:286-306RFB.recvSecurityResult:327-341RFB.sendClientInit:446-451RFB.recvSecurityFailed:343-348
Handles the post-security negotiation phase where the server sends its initial framebuffer information (recvServerInit, recvServerName), and the client responds with its preferred encoding (sendSetEncoding) and pixel format (sendPixelFormat).
Related Classes/Methods:
RFB.recvServerInit:350-356RFB.recvServerName:358-374RFB.sendSetEncoding:461-466RFB.sendPixelFormat:453-459
Responsible for constructing and sending client-originated input events, specifically keyboard (sendKeyEvent) and pointer (sendPointerEvent) actions, to the VNC server.
Related Classes/Methods:
Processes incoming messages from the VNC server related to display updates (recvServerOrder, recvFrameBufferUpdateHeader) and clipboard content changes (recvServerCutTextHeader). It acts as a dispatcher for various server messages.
Related Classes/Methods:
RFB.recvServerOrder:376-391RFB.recvFrameBufferUpdateHeader:393-402RFB.recvServerCutTextHeader:429-436
Defines the structure and serialization/deserialization logic for key RFB protocol messages (Protocol Data Units) exchanged between client and server, such as framebuffer update requests, key events, and pointer events.
Related Classes/Methods:
Provides a high-level interface for external components (e.g., a GUI or CLI application) to interact with and control the RFB client's behavior, such as triggering framebuffer updates or sending input events.
Related Classes/Methods:
Responsible for integrating the RFB protocol logic with the underlying network transport and event loop mechanisms, setting up raw data layers (buildRawLayer) and event observers (buildObserver) for asynchronous communication.
Related Classes/Methods: