cangjie-websocket

Implement WebSocket servers and clients in Cangjie with frame handling.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-websocket
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-websocket
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/websocket
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-websocket

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires stdx.net.http, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers understand and implement WebSocket communication in Cangjie, covering server and client upgrades, frame handling, and connection management.

Core Features & Use Cases

  • Server-side WebSocket: Implement WebSocket servers that handle client connections and upgrade requests.
  • Client-side WebSocket: Develop WebSocket clients to connect to servers and exchange messages.
  • Frame Handling: Understand and manage different WebSocket frame types (control, data, continuation) and their properties (fin, payload).
  • Message Fragmentation: Handle large messages that are split across multiple frames.
  • Connection Lifecycle: Properly manage the WebSocket connection lifecycle, including sending close frames and responding to pings.
  • Use Case: Build a real-time chat application or a live data feed service using Cangjie's WebSocket capabilities.

Quick Start

Use the cangjie-websocket skill to set up a basic WebSocket server that echoes messages back to the client.

Frequently Asked Questions about cangjie-websocket

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement WebSocket communication in Cangjie?

To implement WebSocket communication in Cangjie, you handle server-side HTTP upgrades and client-side connections to establish real-time bidirectional messaging. This Skill covers frame handling and connection management for both server and client setups.

How does WebSocket message fragmentation work in Cangjie?

WebSocket message fragmentation in Cangjie involves splitting large messages across multiple data and continuation frames. You manage these frames by interpreting their `fin` bits and `payload` properties until the final fragment is received.

Do I need the stdx.net.http package for Cangjie WebSocket programming?

Yes, you need the `stdx.net.http` package for Cangjie WebSocket programming because it provides the foundational network operations. Server-side WebSocket upgrades specifically rely on this HTTP package to transition connections.

How do I manage the WebSocket connection lifecycle and control frames in Cangjie?

Managing the WebSocket connection lifecycle in Cangjie requires properly sending close frames to terminate connections and responding to ping control frames. This ensures robust real-time communication and clean closure procedures.

Can I build a real-time chat application using Cangjie WebSocket capabilities?

Yes, you can build a real-time chat application using Cangjie WebSocket capabilities by establishing bidirectional client and server connections. The Skill enables message exchange and live data feed services through proper frame handling.

What is the best way to handle WebSocket server upgrades from HTTP in Cangjie?

The best way to handle WebSocket server upgrades from HTTP in Cangjie is by processing the initial HTTP request and transitioning it to a WebSocket connection. This allows the server to handle subsequent real-time bidirectional data frames.