cangjie-websocket

Implement WebSocket server and client communication in Cangjie language.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-websocket-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-websocket
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/websocket
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-websocket-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the complexities of implementing WebSocket communication in Cangjie language, covering both server-side and client-side scenarios, including message framing and connection management.

Core Features & Use Cases

  • Server-Side Upgrade: Handles WebSocket connection upgrades from HTTP requests.
  • Client-Side Upgrade: Initiates WebSocket connections to servers.
  • Frame Handling: Manages control frames (Close, Ping, Pong) and data frames (Text, Binary, Continuation), including message fragmentation.
  • Connection Lifecycle: Manages the complete WebSocket connection lifecycle, from upgrade to graceful closure.

Quick Start

Use the cangjie-websocket skill to establish a WebSocket connection to 'ws://127.0.0.1:8080/ws' and send the message "hello".

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 language?

You can establish WebSocket communication in Cangjie by utilizing the stdx.net.http module for network operations and std.collection for data structures. The Skill handles both server-side and client-side connection upgrades and message framing.

How do I handle message fragmentation and frame types in a Cangjie WebSocket server?

Message fragmentation and frame types in a Cangjie WebSocket server are handled by managing control frames like Close, Ping, and Pong, alongside data frames such as Text, Binary, and Continuation. This ensures proper real-time message processing.

Can I use Cangjie to establish a WebSocket client connection to an existing server?

Yes, you can use Cangjie to establish a WebSocket client connection to an existing server. The implementation initiates WebSocket connections by managing HTTP upgrade requests and handling the complete connection lifecycle from upgrade to graceful closure.

Does Cangjie WebSocket support both server-side and client-side HTTP upgrade requests?

Cangjie WebSocket supports both server-side and client-side HTTP upgrade requests. Server-side upgrade handles WebSocket connection upgrades from incoming HTTP requests, while client-side upgrade initiates connections to target servers.

What is the best way to manage the WebSocket connection lifecycle in Cangjie?

The best way to manage the WebSocket connection lifecycle in Cangjie is by utilizing built-in mechanisms for HTTP upgrade requests and frame handling. This manages the complete lifecycle from initial upgrade to graceful closure.