{"version":"1.0","type":"rich","title":"Gist ef01d3ebfb3e6f5704bd","description":"This example demonstrates a minimal WebSocket server implemented in Python, showing how to establish a handshake and exchange framed messages. It uses `SocketServer.StreamRequestHandler` for the network layer, manually performs the WebSocket handshake via `sha1` and `b64encode` against the defined magic string, and parses incoming frames by XOR-masking payload bytes. The code handles payload lengths up to 64-bit values and sends text frames with a 129 opcode. It prints received messages to the console, illustrating the core protocol mechanics without any visualization or data rendering.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-ef01d3ebfb3e6f5704bd?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}