cangjie-socket

Implement TCP, UDP, and Unix Domain Socket clients and servers in Cangjie.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides comprehensive guidance and examples for network programming in the Cangjie language, covering TCP, UDP, and Unix Domain Sockets, along with essential configurations and security aspects.

Core Features & Use Cases

  • TCP/UDP Socket Programming: Implement both client and server applications using TcpSocket, TcpServerSocket, UdpSocket.
  • Socket Options & Timeouts: Configure crucial parameters like timeouts, buffer sizes, and TCP-specific options (noDelay, keepAlive).
  • Unix Domain Sockets: Facilitate inter-process communication on the same machine.
  • TLS/SSL Encryption: Secure network communications using stdx.net.tls.
  • Use Case: Develop a high-performance network service in Cangjie, ensuring reliable data transfer and efficient resource management.

Quick Start

Use the cangjie-socket skill to create a simple TCP server that binds to port 33333 and accepts a connection.

Frequently Asked Questions about cangjie-socket

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

FAQPage Schema
How do I create a TCP server in Cangjie that listens on a specific port?

To create a TCP server in Cangjie, you use `TcpServerSocket` to bind to a specific port and accept incoming connections. This Skill provides detailed examples for setting up the listener and handling client data transfer efficiently.

Can I secure Cangjie network communications using TLS or SSL?

Yes, you can secure Cangjie network communications using TLS/SSL encryption. By applying the `stdx.net.tls` module, you ensure secure and encrypted data transfer across your TCP and UDP client-server applications.

How do I configure socket timeouts and buffer sizes in Cangjie?

You configure socket timeouts and buffer sizes in Cangjie by setting specific socket options. This Skill covers configuring crucial parameters like timeouts, buffer sizes, and TCP-specific options including `noDelay` and `keepAlive` for optimized resource management.

Does Cangjie support Unix Domain Sockets for inter-process communication?

Yes, Cangjie supports Unix Domain Sockets to facilitate inter-process communication on the same machine. This allows local processes to communicate efficiently without the overhead of standard network protocols.

How do I implement a UDP client and server in Cangjie?

You implement a UDP client and server in Cangjie using the `UdpSocket` API. This Skill provides detailed examples for both client and server implementations, ensuring reliable datagram transfer for your network service.

What is the best way to handle high-performance network data transfer in Cangjie?

The best way to handle high-performance network data transfer in Cangjie is by combining TCP, UDP, and Unix Domain Sockets with tuned socket options. Configuring timeouts and buffer sizes ensures reliable data transfer and efficient resource management.