# VB6 PRO DOCS > 即刻给你的VB6项目嵌入丰富的服务器和客户端能力 ## Table of Contents - [🌐 VBMan: Modern Web Development Framework for VB6 🚀](/en/vbman.md) - [🌐 VBMan:VB6的现代Web开发框架 🚀](/zh/vbman.md) - [🚀 VBMAN2 升级公告](/zh/vbman2.md) - [🚀 VBMAN2 Upgrade Announcement](/en/vbman2.md) - [010. HttpServer 生产可用性修复](/zh/vbman/httpserver/v1.0.0.423.md) - [010. HttpServer Production Readiness Fix](/en/vbman/httpserver/v1.0.0.423.md) - [2025-05-25 修复 cAI](/zh/vbman/devlog/AI/2025-05-25-修复cAI.md) - [2025-05-25 修复 cHttpClient](/zh/vbman/devlog/HttpClient/2025-05-25-修复cHttpClient.md) - [2025-05-25 修复 cSSEClient](/zh/vbman/devlog/SSEClient/2025-05-25-修复cSSEClient.md) - [2025-05-25 cWinsock P0/P1 功能实现](/zh/vbman/devlog/Winsock/2025-05-25-实现封包协议和心跳机制.md) - [2026-01-26-解决cWinSock常量命名冲突](/zh/vbman/devlog/Winsock/2026-01-26-解决cWinSock常量命名冲突.md) - [2026-01-26-修复VB6保留字冲突](/zh/vbman/devlog/Winsock/2026-01-26-修复VB6保留字冲突.md) - [2026-02-19-完善cRedisClient单元测试](/zh/vbman/devlog/Redis/2026-02-19-完善cRedisClient单元测试.md) - [2026-06-09 分包协议 7 项优化修复](/zh/vbman/devlog/Winsock/2026-06-09-分包协议7项优化修复.md) - [2026-06-09 修复 Session 和 Cookie 设计缺陷](/zh/vbman/devlog/HttpServer/2026-06-09-修复Session和Cookie设计缺陷.md) - [2026-06-09 增加默认文档支持 + 路由流程重构](/zh/vbman/devlog/HttpServer/2026-06-09-增加默认文档支持.md) - [2026-06-09 TCP 粘包/分包问题与 cPacketProtocol 解决方案](/zh/vbman/devlog/Winsock/2026-06-09-TCP粘包分包问题与cPacketProtocol解决方案.md) - [2026-07-12 修复 cHttpClient 编译 DLL 后 SendPost/SendGet 崩溃](/zh/vbman/devlog/HttpClient/2026-07-12-修复DLL编译崩溃.md) - [阿拉伯文 (Arabic)](/zh/emoji/0600-06FF.md) - [阿拉伯文补充 (Arabic Supplement)](/zh/emoji/0750-077F.md) - [阿维斯塔语及巴列维语 (Avestan and Pahlavi)](/zh/emoji/0800-085F.md) - [埃塞俄比亚语 (Ethiopic)](/zh/emoji/1200-137F.md) - [埃塞俄比亚语补充 (Ethiopic Supplement)](/zh/emoji/1380-139F.md) - [安全实践指南](/zh/vbman/httpserver/security.md) - [奥里亚文 (Oriya)](/zh/emoji/0B00-0B7F.md) - [参数化查询](/zh/vbman/database/parameterized.md) - [参数路由与路径段解析](/zh/vbman/httpserver/route-params.md) - [查询操作](/zh/vbman/database/query.md) - [常见问题](/zh/vbman/Toast/faq.md) - [常见问题 (FAQ)](/zh/vbman2/webview2/faq.md) - [常用标点 (General Punctuation)](/zh/emoji/2000-206F.md) - [朝鲜文 (Hangul Jamo)](/zh/emoji/1100-11FF.md) - [串口数据帧分帧协议](/zh/vbman/serialport/framing.md) - [窗口化标签控件(WindowedLabel)](/zh/packages/vbccr/text/windowedlabel.md): 窗口化标签控件(WindowedLabel) - VBCCR 开发手册,基于源码的完整 API 参考 - [德拉维族语 (Malayalam)](/zh/emoji/0D00-0D7F.md) - [动画控件(Animation)](/zh/packages/vbccr/ranges/animation.md): 动画控件(Animation) - VBCCR 开发手册,基于源码的完整 API 参考 - [方块元素 (U+2580 - U+259F)](/zh/emoji/2580-259F.md) - [分包协议与心跳机制](/zh/vbman/winsock/packet-protocol.md) - [分页功能](/zh/vbman/database/pagination.md) - [分页控件(Pager)](/zh/packages/vbccr/bars/pager.md): 分页控件(Pager) - VBCCR 开发手册,基于源码的完整 API 参考 - [封闭式字母数字 (U+2460 - U+24FF)](/zh/emoji/2460-24FF.md) - [服务端模块详解](/zh/biz/cs-auther/server.md) - [复选框控件(CheckBoxW)](/zh/packages/vbccr/buttons/checkboxw.md): 复选框控件(CheckBoxW) - VBCCR 开发手册,基于源码的完整 API 参考 - [富文本框控件(RichTextBox)](/zh/packages/vbccr/text/richtextbox.md): 富文本框控件(RichTextBox) - VBCCR 开发手册,基于源码的完整 API 参考 - [高级功能](/zh/vbman/database/advanced.md) - [格鲁吉亚语 (Georgian)](/zh/emoji/10A0-10FF.md) - [工具方法](/zh/vbman/database/utilities.md) - [工具栏控件(ToolBar)](/zh/packages/vbccr/bars/toolbar.md): 工具栏控件(ToolBar) - VBCCR 开发手册,基于源码的完整 API 参考 - [共享模块说明](/zh/biz/cs-auther/shared.md) - [古吉拉特文 (Gujarati)](/zh/emoji/0A80-0AFF.md) - [光学识别符 (U+2440 - U+245F)](/zh/emoji/2440-245F.md) - [国际音标扩展](/zh/emoji/0250-02AF.md) - [滑块控件(Slider)](/zh/packages/vbccr/ranges/slider.md): 滑块控件(Slider) - VBCCR 开发手册,基于源码的完整 API 参考 - [货币符号 (Currency Symbols)](/zh/emoji/20A0-20CF.md) - [基础命令](/zh/vbman/redis/basic-operations.md) - [技术细节](/zh/vbman/Toast/technical.md) - [箭头 (Arrows)](/zh/emoji/2190-21FF.md) - [结合用读音符号](/zh/emoji/0300-036F.md) - [进度条控件(ProgressBar)](/zh/packages/vbccr/ranges/progressbar.md): 进度条控件(ProgressBar) - VBCCR 开发手册,基于源码的完整 API 参考 - [进阶应用](/zh/vbman/websocket/advanced.md) - [精选案例](/zh/cases/featured-cases.md): VBMAN 精选用户案例展示 - [静态文件服务](/zh/vbman/httpserver/static-files.md) - [捐赠支持](/zh/donate.md) - [卡纳达文 (Kannada)](/zh/emoji/0C80-0CFF.md) - [开发日志](/zh/vbman/start/devlog.md) - [客户端模块详解](/zh/biz/cs-auther/client.md) - [空白修饰字母](/zh/emoji/02B0-02FF.md) - [控制图片 (U+2400 - U+243F)](/zh/emoji/2400-243F.md) - [快速开始](/zh/biz/cs-auther/quickstart.md) - [快速开始](/zh/vbman/modbus/quickstart.md) - [快速开始](/zh/vbman/websocket/quickstart.md) - [快速入门](/zh/vbman/database/quickstart.md) - [拉丁文扩展-A](/zh/emoji/0100-017F.md) - [拉丁文扩展-B](/zh/emoji/0180-024F.md) - [老挝文 (Lao)](/zh/emoji/0E80-0EFF.md) - [冷却栏控件(CoolBar)](/zh/packages/vbccr/bars/coolbar.md): 冷却栏控件(CoolBar) - VBCCR 开发手册,基于源码的完整 API 参考 - [连接管理](/zh/vbman/database/connection.md) - [连接管理](/zh/vbman/redis/connection.md) - [联系我们](/zh/CONTACT.md) - [链接标签控件(LinkLabel)](/zh/packages/vbccr/text/linklabel.md): 链接标签控件(LinkLabel) - VBCCR 开发手册,基于源码的完整 API 参考 - [链式 CURD - 聚合终结方法](/zh/vbman/database/chain-curd-aggregate.md) - [链式 CURD - 排序、分组、连接与选择](/zh/vbman/database/chain-curd-modifiers.md) - [链式 CURD - 条件方法](/zh/vbman/database/chain-curd-where.md) - [链式 CURD - 限制与分页](/zh/vbman/database/chain-curd-limit-page.md) - [链式 CURD - 终结方法](/zh/vbman/database/chain-curd-terminal.md) - [链式 CURD - 综合示例与最佳实践](/zh/vbman/database/chain-curd-examples.md) - [链式 CURD 操作](/zh/vbman/database/chain-curd.md) - [列表框控件(ListBoxW)](/zh/packages/vbccr/lists/listboxw.md): 列表框控件(ListBoxW) - VBCCR 开发手册,基于源码的完整 API 参考 - [列表视图控件(ListView)](/zh/packages/vbccr/views/listview.md): 列表视图控件(ListView) - VBCCR 开发手册,基于源码的完整 API 参考 - [路由系统详解](/zh/vbman/httpserver/router.md) - [马尔代夫语 (Thaana)](/zh/emoji/0780-07BF.md) - [曼底安文 (Mandaic)](/zh/emoji/0860-087F.md) - [孟加拉语 (Bengali)](/zh/emoji/0980-09FF.md) - [缅甸语 (Myanmar)](/zh/emoji/1000-109F.md) - [命令按钮控件(CommandButtonW)](/zh/packages/vbccr/buttons/commandbuttonw.md): 命令按钮控件(CommandButtonW) - VBCCR 开发手册,基于源码的完整 API 参考 - [命令链接控件(CommandLink)](/zh/packages/vbccr/buttons/commandlink.md): 命令链接控件(CommandLink) - VBCCR 开发手册,基于源码的完整 API 参考 - [内存证书集合模式 (TlsCertMemory)](/zh/vbman/tls/certmemory.md) - [轻量物联网云平台](/zh/cases/case-iot-cloud.md): 拼个 URL 就能读写数据 - 基于 VBMAN HttpServer 构建的轻量级 IoT 数据存储服务 - [热键控件(HotKey)](/zh/packages/vbccr/text/hotkey.md): 热键控件(HotKey) - VBCCR 开发手册,基于源码的完整 API 参考 - [日期时间选择器控件(DTPicker)](/zh/packages/vbccr/datetime/dtpicker.md): 日期时间选择器控件(DTPicker) - VBCCR 开发手册,基于源码的完整 API 参考 - [日志系统详解](/zh/biz/cs-auther/logging.md) - [撒马利亚语 (Samaritan)](/zh/emoji/0880-08AF.md) - [僧伽罗语 (Sinhala)](/zh/emoji/0D80-0DFF.md) - [上标及下标 (Superscripts and Subscripts)](/zh/emoji/2070-209F.md) - [上下调整控件(UpDown)](/zh/packages/vbccr/ranges/updown.md): 上下调整控件(UpDown) - VBCCR 开发手册,基于源码的完整 API 参考 - [使用示例](/zh/vbman/Toast/examples.md) - [事务操作](/zh/vbman/redis/transaction.md) - [事务处理](/zh/vbman/database/transaction.md) - [树视图控件(TreeView)](/zh/packages/vbccr/views/treeview.md): 树视图控件(TreeView) - VBCCR 开发手册,基于源码的完整 API 参考 - [数据绑定专题 - BindUI / BindData / SetData](/zh/vbman2/webview2/bindui.md) - [数据库集成](/zh/vbman/httpserver/database.md) - [数据库类库开发文档](/zh/vbman/database.md) - [数学运算符 (Mathematical Operators)](/zh/emoji/2200-22FF.md) - [数值调节控件(SpinBox)](/zh/packages/vbccr/text/spinbox.md): 数值调节控件(SpinBox) - VBCCR 开发手册,基于源码的完整 API 参考 - [数字形式 (Number Forms)](/zh/emoji/2150-218F.md) - [宿主适配专题 - VB6/Excel/Access 多宿主集成](/zh/vbman2/webview2/hosting.md) - [泰卢固文 (Telugu)](/zh/emoji/0C00-0C7F.md) - [泰米尔文 (Tamil)](/zh/emoji/0B80-0BFF.md) - [泰文 (Thai)](/zh/emoji/0E00-0E7F.md) - [天城文书 (Devanagari)](/zh/emoji/0900-097F.md) - [通信协议](/zh/biz/cs-auther/protocol.md) - [通用对话框控件(CommonDialog)](/zh/packages/vbccr/system/commondialog.md): 通用对话框控件(CommonDialog) - VBCCR 开发手册,基于源码的完整 API 参考 - [通用控件替代包【官方文档】](/zh/packages/vbccr/author.md): 通用控件替代包【官方文档】 - VBCCR 开发手册,基于源码的完整 API 参考 - [图像列表控件(ImageList)](/zh/packages/vbccr/system/imagelist.md): 图像列表控件(ImageList) - VBCCR 开发手册,基于源码的完整 API 参考 - [图像组合框控件(ImageCombo)](/zh/packages/vbccr/lists/imagecombo.md): 图像组合框控件(ImageCombo) - VBCCR 开发手册,基于源码的完整 API 参考 - [完整示例](/zh/vbman/redis/examples.md) - [文本框控件(TextBoxW)](/zh/packages/vbccr/text/textboxw.md): 文本框控件(TextBoxW) - VBCCR 开发手册,基于源码的完整 API 参考 - [文件传输系统](/zh/biz/cs-auther/filetransfer.md) - [西非書面語言 (N'Ko)](/zh/emoji/07C0-07FF.md) - [西里尔字母 (Cyrillic)](/zh/emoji/0400-04FF.md) - [西里尔字母补充 (Cyrillic Supplement)](/zh/emoji/0500-052F.md) - [希伯来文 (Hebrew)](/zh/emoji/0590-05FF.md) - [希腊文及科普特文](/zh/emoji/0370-03FF.md) - [锡克教文 (Gurmukhi)](/zh/emoji/0A00-0A7F.md) - [系统架构](/zh/biz/cs-auther/architecture.md) - [系统信息控件(SysInfo)](/zh/packages/vbccr/system/sysinfo.md): 系统信息控件(SysInfo) - VBCCR 开发手册,基于源码的完整 API 参考 - [虚拟列表框控件(VListBox)](/zh/packages/vbccr/lists/vlistbox.md): 虚拟列表框控件(VListBox) - VBCCR 开发手册,基于源码的完整 API 参考 - [虚拟组合框控件(VirtualCombo)](/zh/packages/vbccr/lists/virtualcombo.md): 虚拟组合框控件(VirtualCombo) - VBCCR 开发手册,基于源码的完整 API 参考 - [叙利亚文 (Syriac)](/zh/emoji/0700-074F.md) - [选项按钮控件(OptionButtonW)](/zh/packages/vbccr/buttons/optionbuttonw.md): 选项按钮控件(OptionButtonW) - VBCCR 开发手册,基于源码的完整 API 参考 - [选项卡控件(TabStrip)](/zh/packages/vbccr/views/tabstrip.md): 选项卡控件(TabStrip) - VBCCR 开发手册,基于源码的完整 API 参考 - [亚美尼亚语 (Armenian)](/zh/emoji/0530-058F.md) - [用户案例](/zh/cases.md): VBMAN 用户案例展示 - 物联网、工业控制、Web应用等领域的实际项目 - [用户案例目录](/zh/cases/README.md) - [月历视图控件(MonthView)](/zh/packages/vbccr/datetime/monthview.md): 月历视图控件(MonthView) - VBCCR 开发手册,基于源码的完整 API 参考 - [杂项工业符号 (U+2300 - U+23FF)](/zh/emoji/2300-23FF.md) - [暂停开放的通知](/demo/stop.md) - [藏文 (Tibetan)](/zh/emoji/0F00-0FFF.md) - [增强框架控件(FrameW)](/zh/packages/vbccr/system/framew.md): 增强框架控件(FrameW) - VBCCR 开发手册,基于源码的完整 API 参考 - [证书文件模式 (TlsCertFile)](/zh/vbman/tls/certfile.md) - [执行操作](/zh/vbman/database/execute.md) - [制表符 (U+2500 - U+257F)](/zh/emoji/2500-257F.md) - [致谢](/zh/CREDITS.md) - [致谢](/zh/vbman/CREDITS.md) - [致谢](/zh/vbman2/CREDITS.md) - [中间件系统详解](/zh/vbman/httpserver/middleware.md) - [状态栏控件(StatusBar)](/zh/packages/vbccr/bars/statusbar.md): 状态栏控件(StatusBar) - VBCCR 开发手册,基于源码的完整 API 参考 - [字母式符号 (Letterlike Symbols)](/zh/emoji/2100-214F.md) - [字体组合框控件(FontCombo)](/zh/packages/vbccr/lists/fontcombo.md): 字体组合框控件(FontCombo) - VBCCR 开发手册,基于源码的完整 API 参考 - [组合框控件(ComboBoxW)](/zh/packages/vbccr/lists/comboboxw.md): 组合框控件(ComboBoxW) - VBCCR 开发手册,基于源码的完整 API 参考 - [组合用记号 (Combining Diacritics Marks for Symbols)](/zh/emoji/20D0-20FF.md) - [最终用户许可协议](/zh/EULA.md) - [Advanced Features](/en/vbman/database/advanced.md) - [Advanced Usage Guide](/en/vbman/websocket/advanced.md) - [AES 加密方法参考](/zh/vbman/crypt/aes/methods.md) - [AES 加密组件概述](/zh/vbman/crypt/aes/overview.md) - [AES Encryption Component Overview](/en/vbman/crypt/aes/overview.md) - [AES Encryption Methods Reference](/en/vbman/crypt/aes/methods.md) - [Animation Control](/en/packages/vbccr/ranges/animation.md): Animation Control - VBCCR Development Manual, complete API reference based on source code - [API 参考](/zh/vbman/Toast/api.md) - [API Reference](/en/vbman/Toast/api.md) - [Basic Commands](/en/vbman/redis/basic-operations.md) - [C0控制符及基本拉丁文](/zh/emoji/0000-007F.md) - [C1控制符及拉丁文补充-1](/zh/emoji/0080-00FF.md) - [cAI 方法参考](/zh/vbman/ai/methods.md) - [cAI 事件参考](/zh/vbman/ai/events.md) - [cAI 属性参考](/zh/vbman/ai/properties.md) - [cAI 组件概述](/zh/vbman/ai/overview.md) - [cByteBuffer 类参考](/zh/vbman/websocket/buffer.md) - [cByteBuffer Class Reference](/en/vbman/websocket/buffer.md) - [cCollection 方法参考](/zh/vbman/collection/methods.md) - [cCollection 概述](/zh/vbman/collection/overview.md) - [cCollection 属性参考](/zh/vbman/collection/properties.md) - [cCollection Methods Reference](/en/vbman/collection/methods.md) - [cCollection Overview](/en/vbman/collection/overview.md) - [cCollection Properties Reference](/en/vbman/collection/properties.md) - [cDatabase 测试指南](/zh/vbman/database/testing.md) - [cDataBase Class Library Development Documentation](/en/vbman/database.md) - [cDatabase Testing Guide](/en/vbman/database/testing.md) - [cDelay 延时对象 - TODO 与路线图](/zh/vbman/delay/TODO.md) - [cDelay 延时对象开发文档](/zh/vbman/delay/readme.md) - [cDelay Delay Object - TODO and Roadmap](/en/vbman/delay/TODO.md) - [cDelay Delay Object Development Documentation](/en/vbman/delay/readme.md) - [cDelay vs 原生 `Do...Loop + DoEvents` 及 `Timer 控件` 对比分析](/zh/vbman/delay/whyDelay.md) - [cDelay vs Native `Do...Loop + DoEvents` and `Timer Control` Comparison](/en/vbman/delay/whyDelay.md) - [CDP 专题 - Chrome DevTools Protocol 调用指南](/zh/vbman2/webview2/cdp.md) - [CDP Guide - Chrome DevTools Protocol Calling Guide](/en/vbman2/webview2/cdp.md) - [Certificate File Mode (TlsCertFile)](/en/vbman/tls/certfile.md) - [cFileEx 类](/zh/vbman/tools/fso/cFileEx.md) - [cFileEx Class](/en/vbman/tools/fso/cFileEx.md) - [cFileIO 类](/zh/vbman/tools/fso/cFileIO.md) - [cFileIO Class](/en/vbman/tools/fso/cFileIO.md) - [Chained CRUD - Aggregate Terminal Methods](/en/vbman/database/chain-curd-aggregate.md) - [Chained CRUD - Condition Methods](/en/vbman/database/chain-curd-where.md) - [Chained CRUD - Examples & Best Practices](/en/vbman/database/chain-curd-examples.md) - [Chained CRUD - Limit & Pagination](/en/vbman/database/chain-curd-limit-page.md) - [Chained CRUD - Sort, Group, Join & Selection](/en/vbman/database/chain-curd-modifiers.md) - [Chained CRUD - Terminal Methods](/en/vbman/database/chain-curd-terminal.md) - [Chained CRUD Operations](/en/vbman/database/chain-curd.md) - [CheckBoxW Control](/en/packages/vbccr/buttons/checkboxw.md): CheckBoxW Control - VBCCR Development Manual, complete API reference based on source code - [cHttpClient 方法参考](/zh/vbman/httpclient/methods.md) - [cHttpClient 属性参考](/zh/vbman/httpclient/properties.md) - [cHttpClient 异步事件增强](/zh/vbman/devlog/HttpClient/2026-07-13-异步事件增强.md) - [cHttpClient 组件概述](/zh/vbman/httpclient/overview.md) - [cHttpClient Component Overview](/en/vbman/httpclient/overview.md) - [cHttpClient Methods Reference](/en/vbman/httpclient/methods.md) - [cHttpClient Properties Reference](/en/vbman/httpclient/properties.md) - [cHttpServer 方法参考](/zh/vbman/httpserver/methods.md) - [cHttpServer 组件概述](/zh/vbman/httpserver/overview.md) - [cHttpServer Component Overview](/en/vbman/httpserver/overview.md) - [cHttpServer Methods Reference](/en/vbman/httpserver/methods.md) - [cHttpServer TLS/HTTPS 支持](/zh/vbman/httpserver/tls.md) - [cHttpServer TLS/HTTPS Support](/en/vbman/httpserver/tls.md) - [cHttpServerContext 上下文对象](/zh/vbman/httpserver/context.md) - [cHttpServerContext Context Object](/en/vbman/httpserver/context.md) - [cHttpServerRequest 请求对象](/zh/vbman/httpserver/request.md) - [cHttpServerRequest Request Object](/en/vbman/httpserver/request.md) - [cHttpServerResponse 响应对象](/zh/vbman/httpserver/response.md) - [cHttpServerResponse Response Object](/en/vbman/httpserver/response.md) - [cHttpServerStatistics 性能统计](/zh/vbman/httpserver/statistics.md) - [cHttpServerStatistics Performance Statistics](/en/vbman/httpserver/statistics.md) - [cImage - 图片数据互转类](/zh/vbman/tools/image.md) - [cImage - Image Data Conversion Class](/en/vbman/tools/image.md) - [cJson 常见问题解答(FAQ)](/zh/vbman/Json/faq.md) - [cJson 开发者文档手册](/zh/vbman/Json/README.md) - [cJson 开发者文档手册](/zh/vbman/Json.md) - [cJson 快速开始指南](/zh/vbman/Json/quickstart.md) - [cJson 示例代码集](/zh/vbman/Json/examples.md) - [cJson 最佳实践与注意事项](/zh/vbman/Json/best-practices.md) - [cJson API 参考手册](/zh/vbman/Json/api-reference.md) - [cJson API Reference](/en/vbman/Json/api-reference.md) - [cJson Best Practices and Tips](/en/vbman/Json/best-practices.md) - [cJson Code Examples](/en/vbman/Json/examples.md) - [cJson Developer Documentation](/en/vbman/Json/README.md) - [cJson Developer Documentation](/en/vbman/Json.md) - [cJson Frequently Asked Questions (FAQ)](/en/vbman/Json/faq.md) - [cJson Quick Start Guide](/en/vbman/Json/quickstart.md) - [cLogs 方法参考](/zh/vbman/logs/methods.md) - [cLogs 日志组件概述](/zh/vbman/logs/overview.md) - [cLogs 属性参考](/zh/vbman/logs/properties.md) - [cLogs Component Overview](/en/vbman/logs/overview.md) - [cLogs Methods Reference](/en/vbman/logs/methods.md) - [cLogs Property Reference](/en/vbman/logs/properties.md) - [cModbusMaster 类参考](/zh/vbman/modbus/master.md) - [cModbusSlave 类参考](/zh/vbman/modbus/slave.md) - [ComboBoxW Control](/en/packages/vbccr/lists/comboboxw.md): ComboBoxW Control - VBCCR Development Manual, complete API reference based on source code - [CommandButtonW Control](/en/packages/vbccr/buttons/commandbuttonw.md): CommandButtonW Control - VBCCR Development Manual, complete API reference based on source code - [CommandLink Control](/en/packages/vbccr/buttons/commandlink.md): CommandLink Control - VBCCR Development Manual, complete API reference based on source code - [Common Controls Replacement (Official Document)](/en/packages/vbccr/author.md): Official documentation for VBCCR - VB Common Controls Replacement library, covering StdEXE/OCX usage guide, OCX2StdEXE tool, compilation options and version history. - [CommonDialog Control](/en/packages/vbccr/system/commondialog.md): CommonDialog Control - VBCCR Development Manual, Complete API Reference Based on Source Code - [Complete Examples](/en/vbman/redis/examples.md) - [Connection Management](/en/vbman/database/connection.md) - [Connection Management](/en/vbman/redis/connection.md) - [Contact Us](/en/CONTACT.md) - [Cookie 管理详解](/zh/vbman/httpserver/cookie.md) - [Cookie Management Guide](/en/vbman/httpserver/cookie.md) - [CoolBar Control](/en/packages/vbccr/bars/coolbar.md): CoolBar Control - VBCCR Developer Reference, complete API documentation based on source code - [cPLI 方法参考](/zh/vbman/pli/methods.md) - [cPLI 外部程序接口组件](/zh/vbman/pli/overview.md) - [cPLI External Program Interface Component](/en/vbman/pli/overview.md) - [cPLI Methods Reference](/en/vbman/pli/methods.md) - [cQRcode 二维码组件概述](/zh/vbman/qrcode/overview.md) - [cQRcode 方法参考](/zh/vbman/qrcode/methods.md) - [cQRcode Methods Reference](/en/vbman/qrcode/methods.md) - [cQRcode QR Code Component Overview](/en/vbman/qrcode/overview.md) - [cRedisClient - Redis 客户端](/zh/vbman/redis/README.md) - [cRedisClient - Redis Client](/en/vbman/redis/README.md) - [cRedisClient 单元测试](/zh/vbman/redis/testing.md) - [cRedisClient Unit Testing](/en/vbman/redis/testing.md) - [Credits](/en/CREDITS.md) - [Credits](/en/vbman/CREDITS.md) - [Credits](/en/vbman2/CREDITS.md) - [Crypt 加密组件概述](/zh/vbman/crypt/overview.md) - [Crypt Encryption Components Overview](/en/vbman/crypt/overview.md) - [cs-auther — VBMAN 网络授权框架示例](/zh/biz/cs-auther.md) - [cSerialPort 常见问题](/zh/vbman/serialport/faq.md) - [cSerialPort 串口通信开发文档](/zh/vbman/serialport/overview.md) - [cSerialPort 方法详解](/zh/vbman/serialport/methods.md) - [cSerialPort 高级进阶](/zh/vbman/serialport/advanced.md) - [cSerialPort 快速入门](/zh/vbman/serialport/quickstart.md) - [cSerialPort 事件详解](/zh/vbman/serialport/events.md) - [cSerialPort 属性详解](/zh/vbman/serialport/properties.md) - [cSerialPort Advanced](/en/vbman/serialport/advanced.md) - [cSerialPort Events Reference](/en/vbman/serialport/events.md) - [cSerialPort FAQ](/en/vbman/serialport/faq.md) - [cSerialPort Methods Reference](/en/vbman/serialport/methods.md) - [cSerialPort Properties Reference](/en/vbman/serialport/properties.md) - [cSerialPort Quick Start](/en/vbman/serialport/quickstart.md) - [cSerialPort Serial Communication Development Documentation](/en/vbman/serialport/overview.md) - [cSSEClient SSE 客户端组件](/zh/vbman/httpclient/sse.md) - [cSSEClient SSE Client Component](/en/vbman/httpclient/sse.md) - [cStartUp 方法参考](/zh/vbman/startup/methods.md) - [cStartUp 开机启动管理组件](/zh/vbman/startup/overview.md) - [cStartUp 属性参考](/zh/vbman/startup/properties.md) - [cStartUp Auto-start Management Component](/en/vbman/startup/overview.md) - [cStartUp Methods Reference](/en/vbman/startup/methods.md) - [cStartUp Properties Reference](/en/vbman/startup/properties.md) - [cStdIO 标准输入输出组件](/zh/vbman/stdio/overview.md) - [cStdIO 方法参考](/zh/vbman/stdio/methods.md) - [cStdIO 使用示例](/zh/vbman/stdio/examples.md) - [cStdIO Methods Reference](/en/vbman/stdio/methods.md) - [cStdIO Standard Input/Output Component](/en/vbman/stdio/overview.md) - [cStdIO Usage Examples](/en/vbman/stdio/examples.md) - [cToast 消息提示组件](/zh/vbman/Toast.md) - [cToast Notification Component](/en/vbman/Toast.md) - [cToolsFso 类](/zh/vbman/tools/fso/cToolsFso.md) - [cToolsFso Class](/en/vbman/tools/fso/cToolsFso.md) - [cToolsStream 类](/zh/vbman/tools/fso/cToolsStream.md) - [cToolsStream Class](/en/vbman/tools/fso/cToolsStream.md) - [cWebSocketClient 类参考](/zh/vbman/websocket/client.md) - [cWebSocketClient Class Reference](/en/vbman/websocket/client.md) - [cWebSocketFrame 类参考](/zh/vbman/websocket/frame.md) - [cWebSocketFrame Class Reference](/en/vbman/websocket/frame.md) - [cWebSocketServer 类参考](/zh/vbman/websocket/server.md) - [cWebSocketServer Class Reference](/en/vbman/websocket/server.md) - [cWebView2Host 方法参考](/zh/vbman2/webview2/methods.md) - [cWebView2Host 类开发文档](/zh/vbman2/webview2/overview.md) - [cWebView2Host 事件参考](/zh/vbman2/webview2/events.md) - [cWebView2Host 属性参考](/zh/vbman2/webview2/properties.md) - [cWebView2Host 属性与方法使用时机参考](/zh/vbman2/webview2/usage-timing.md) - [cWebView2Host Class Developer Documentation](/en/vbman2/webview2/overview.md) - [cWebView2Host Events Reference](/en/vbman2/webview2/events.md) - [cWebView2Host Methods Reference](/en/vbman2/webview2/methods.md) - [cWebView2Host Properties Reference](/en/vbman2/webview2/properties.md) - [cWebView2Host Property & Method Usage Timing Reference](/en/vbman2/webview2/usage-timing.md) - [cWinsock 编码指南](/zh/vbman/winsock/encoding.md) - [cWinsock 方法参考](/zh/vbman/winsock/methods.md) - [cWinsock 开发计划](/zh/vbman/winsock/roadmap.md) - [cWinsock 开发文档](/zh/vbman/demo/14.Winsock.md) - [cWinsock 类开发文档](/zh/vbman/winsock/overview.md) - [cWinsock 事件详解](/zh/vbman/winsock/events.md) - [cWinsock 属性参考](/zh/vbman/winsock/properties.md) - [cWinsock 同步方法详解](/zh/vbman/winsock/sync-methods.md) - [cWinsock 用户绑定与组管理](/zh/vbman/winsock/binding.md) - [cWinsock 最佳实践](/zh/vbman/winsock/best-practices.md) - [cWinsock Best Practices](/en/vbman/winsock/best-practices.md) - [cWinsock Class Development Documentation\r\n\r\n> 🚀 **cWinsock** - Simplified VB6 Winsock wrapper library, developed by woeoio@qq.com based on VbAsyncSocket (author: wqweto@gmail.com)\r\n\r\n## 📖 Table of Contents\r\n\r\n- [Overview](#overview)\r\n- [Core Highlights](#core-highlights)\r\n- [Comparison with Native Winsock Control](#comparison-with-native-winsock-control)\r\n- [Quick Start](#quick-start)\r\n- [Architecture Design](#architecture-design)\r\n- [Documentation Index](#documentation-index)\r\n\r\n---\r\n\r\n## Overview\r\n\r\n`cWinsock` is a lightweight network communication class designed for VB6, providing an event-driven programming model similar to the classic Winsock control, but with a simpler API and more powerful features.\r\n\r\n### ✨ Main Features\r\n\r\n- 🔌 **Pure class implementation** - No controls required, direct object programming\r\n- 🎯 **Direct object reference** - Event parameters directly pass client objects, no index lookup needed\r\n- 🌐 **Dual protocol support** - Simultaneously supports TCP and UDP communication\r\n- 🏢 **Automatic client management** - Server mode automatically manages all connected clients\r\n- 📦 **Smart data encoding** - Supports multiple text encodings (GBK/ACP, UTF-8, Unicode)\r\n- 🛡️ **Connection interception** - Blacklist/whitelist mechanism via `ConnectionRequest` event\r\n- 🔄 **Event proxy mechanism** - Server client data unified through server event triggering\r\n- 💾 **Flexible data types** - Supports both string and byte array data formats\r\n- 📦 **Data packet protocol** - Three built-in protocols solve TCP fragmentation/sticky packet, automatic packet/unpacket\r\n- 💓 **Smart heartbeat mechanism** - Embedded timer auto-drive, server timeout detection, client smart keep-alive\r\n- 🔒 **TLS/SSL support** - Chain function configuration for TLS, both client and server can encrypt communication\r\n- 🎯 **GetData enhanced** - Return value style convenience methods, one-line code to get text/Hex/byte array\r\n\r\n---\r\n\r\n## Core Highlights\r\n\r\n### 1️⃣ Direct Object Reference Event Model 🔗\r\n\r\n**Traditional Winsock control problems:**\r\n`vb\r\n' Need to manage clients via index\r\nPrivate Sub Winsock1_ConnectionRequest(Index As Integer, ByVal requestID As Long)\r\n Dim i As Integer\r\n ' Find available index or dynamically load control...\r\nEnd Sub\r\n\r\n' When processing data, need to know which client\r\nPrivate Sub Winsock1_DataArrival(Index As Integer, ByVal bytesTotal As Long)\r\n Winsock1(Index).GetData strData\r\nEnd Sub\r\n`\r\n\r\n**cWinsock's elegant solution:**\r\n`vb\r\n' Event directly passes client object!\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n ' Directly operate on Client object, no index needed\r\n Debug.Print "New client: " & Client.RemoteHostIP\r\n \r\n ' Reject blacklist IP\r\n If IsBlacklisted(Client.RemoteHostIP) Then\r\n DisConnect = True\r\n End If\r\nEnd Sub\r\n\r\n' Data event also directly passes client object\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n ' Directly read data from Client object, no index lookup needed\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n### 2️⃣ Smart TCP Client Event Proxy 📡\r\n\r\n**Problem scenario:** After server accepts new connection and creates client object, its data reception event cannot be subscribed by host.\r\n\r\n**cWinsock's solution:** Automatically trigger events through parent server object\r\n\r\n`vb\r\n' In server object's DataArrival event\r\n' Can receive data from all clients!\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n \r\n ' Client parameter is the specific client object\r\n ' Can directly reply to that client\r\n Client.SendData "Echo: " & sData\r\nEnd Sub\r\n`\r\n\r\n**How it works:**\r\n1. Server accepts new connection, creates independent client socket object\r\n2. Client receives data, triggers event via parent server's `RaiseDataArrivalEvent` method\r\n3. Host only needs to subscribe to server object events to handle all client data\r\n\r\n---\r\n\r\n### 3️⃣ UDP Server Virtual Client Management 🎭\r\n\r\nUDP is a connectionless protocol, but `cWinsock` creates virtual client objects for each different remote address:port combination, simulating connection behavior:\r\n\r\n`vb\r\n' UDP server mode\r\nPrivate Sub m_oUdp_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n ' Each remote address:port combination that communicates for the first time\r\n ' Automatically creates a virtual Client object\r\n Debug.Print "UDP client: " & Client.RemoteHostIP & ":" & Client.RemotePort\r\nEnd Sub\r\n\r\nPrivate Sub m_oUdp_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n \r\n ' Can reply to specific virtual client\r\n ' cWinsock automatically uses correct target address:port\r\n Client.SendData "Reply: " & sData\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n### 4️⃣ Connection Request Interception Mechanism 🚦\r\n\r\nImplement connection interception via `DisConnect` parameter in `ConnectionRequest` event:\r\n\r\n`vb\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n ' Blacklist check\r\n If IsInBlacklist(Client.RemoteHostIP) Then\r\n Debug.Print "Reject blacklist IP: " & Client.RemoteHostIP\r\n DisConnect = True ' Set to True, automatically disconnect and cleanup resources\r\n Exit Sub\r\n End If\r\n \r\n ' Port range restriction\r\n If Client.RemotePort < 1024 Then\r\n Debug.Print "Reject privileged port connection: " & Client.RemotePort\r\n DisConnect = True\r\n Exit Sub\r\n End If\r\n \r\n ' Whitelist mode\r\n If m_bWhitelistMode And Not IsInWhitelist(Client.RemoteHostIP) Then\r\n Debug.Print "Not in whitelist, reject connection"\r\n DisConnect = True\r\n Exit Sub\r\n End If\r\n \r\n ' Keep DisConnect False, accept connection\r\n Debug.Print "Accept connection: " & Client.RemoteHostIP & ":" & Client.RemotePort\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n### 5️⃣ Flexible Text Encoding Support 🔤\r\n\r\nSupports multiple encoding methods to adapt to different scenarios:\r\n\r\n`vb\r\n' Default uses ACP/GBK encoding (compatible with VB6)\r\nClient.SendData "中文测试"\r\nClient.GetData sData ' Default ACP\r\n\r\n' Use UTF-8 encoding (recommended for network transmission)\r\nClient.SendData "中文测试", ucsScpUtf8\r\nClient.GetData sData, , , ucsScpUtf8\r\n\r\n' Use Unicode (no conversion, keep wide characters)\r\nClient.SendData "中文测试", ScpUnicode\r\nClient.GetData sData, , , ScpUnicode\r\n\r\n' Send byte array (no encoding involved)\r\nDim baData() As Byte\r\nbaData = GetByteArray()\r\nClient.SendData baData\r\n`\r\n\r\n**Encoding enumeration:**\r\n- `ScpAcp` (0) - System default code page (GBK on Chinese Windows)\r\n- `ScpUtf8` (65001) - UTF-8 encoding\r\n- `ScpUnicode` (-1) - Unicode, no encoding conversion\r\n\r\n---\r\n\r\n### 6️⃣ Automatic Client Collection Management 📚\r\n\r\nIn server mode, automatically maintains all connected clients:\r\n\r\n`vb\r\n' Client collection automatically initialized when server starts\r\nm_oServer.Listen 8080\r\n\r\n' Iterate through all clients\r\nDim oClient As cWinsock\r\nFor Each oClient In m_oServer.Clients\r\n Debug.Print "Client: " & oClient.ClientId & " - " & oClient.RemoteHostIP\r\nNext\r\n\r\n' Get client count\r\nDebug.Print "Current connections: " & m_oServer.ClientCount\r\n\r\n' Manually remove client (usually automatically handled by CloseEvent)\r\nm_oServer.RemoveClient oClient\r\n`\r\n\r\n---\r\n\r\n### 7️⃣ Smart Remote Address Resolution 🌐\r\n\r\nUDP server mode supports domain name resolution:\r\n\r\n`vb\r\n' Set remote address (can be IP or domain name)\r\nm_oUdp.RemoteHost = "example.com"\r\nm_oUdp.RemotePort = 8888\r\n\r\n' Domain name automatically resolved when sending\r\nm_oUdp.SendData "Hello"\r\n`\r\n\r\n**Internal logic:**\r\n`vb\r\n' Smart selection in SendData method\r\nIf LenB(m_sRemoteHostIP) <> 0 Then\r\n ' If resolved IP exists, prioritize using it\r\n m_oSocket.SendText Data, m_sRemoteHostIP, m_lRemotePort, CodePage\r\nElseIf LenB(m_sRemoteHost) <> 0 Then\r\n ' Otherwise use hostname, underlying layer automatically resolves domain name\r\n m_oSocket.SendText Data, m_sRemoteHost, m_lRemotePort, CodePage\r\nEnd If\r\n`\r\n\r\n---\r\n\r\n### 8️⃣ Data Buffer Management 📊\r\n\r\nBuilt-in data buffer, supports partial reading:\r\n\r\n`vb\r\n' When receiving data, only read first 100 bytes\r\nDim sPartial As String\r\nClient.GetData sPartial, vbString, 100\r\n\r\n' Remaining data automatically saved in internal buffer\r\n' Will continue to return remaining data on next read\r\n`\r\n\r\n**Internal buffer mechanism:**\r\n- TCP and client mode: Use `m_baRecvBuffer` private member\r\n- UDP server virtual client: Use `UserData` property for temporary storage\r\n\r\n---\r\n\r\n### 9️⃣ Data Packet Protocol 📦\r\n\r\n**Problem scenario**: TCP is a streaming protocol with data fragmentation and sticky packet issues\r\n\r\n`vb\r\n' Sender sends continuously\r\nClient.SendData "Hello"\r\nClient.SendData "World"\r\n\r\n' Receiver may receive\r\n"HelloWorld" ' Sticky packet\r\n"Hel" ' Fragmentation\r\n"loWorld"\r\n`\r\n\r\n**cWinsock built-in three protocols to solve this:**\r\n- **Character delimiter protocol** (`ppDelimiter`) - Supports custom delimiters (e.g., `\r\n`, `|`, `\0`, etc.)\r\n- **Fixed length protocol** (`ppFixedLength`) - Suitable for fixed-length messages\r\n- **Length header protocol** (`ppLengthHeader`) - Supports 2/4 byte headers, configurable endianness\r\n\r\n**Usage example:**\r\n`vb\r\n' Set character delimiter protocol\r\nServer.PacketProtocol = ppDelimiter\r\nServer.Delimiter = vbCrLf\r\n\r\n' Or set length header protocol\r\nServer.PacketProtocol = ppLengthHeader\r\nServer.HeaderBytes = 4 ' 4-byte length header\r\nServer.HeaderEndian = eeLittleEndian\r\n\r\n' Send automatic packet\r\nClient.SendData "Hello World" ' Automatically append protocol marker\r\n\r\n' Receive automatic unpacket - use MessageArrival event\r\nPrivate Sub Server_MessageArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetDataText sData ' Get complete message\r\nEnd Sub\r\n`\r\n\r\n**Key features:**\r\n- Each client has independent protocol instance, buffers isolated from each other\r\n- New clients automatically inherit server protocol configuration\r\n- In protocol mode, **only `MessageArrival` is triggered**, not `DataArrival`, to avoid duplicate reads\r\n- Heartbeat data goes through protocol encoding, does not pollute protocol state machine\r\n- `MaxPacketSize`/`MaxBufferSize` safety limits, prevent malicious packets and memory exhaustion\r\n- UDP clients also support packet protocol\r\n\r\n**Detailed description**: See [Packet Protocol and Heartbeat Mechanism](./packet-protocol.md), [Properties Reference](./properties.md), [Events Reference](./events.md)\r\n\r\n---\r\n\r\n### 🔟 TCP Smart Heartbeat 💓\r\n\r\n**Problem scenario**: TCP connection may silently disconnect due to network issues, need keep-alive mechanism\r\n\r\n**cWinsock built-in heartbeat manager**, embedded `cTimer` auto-drive, no external timer needed:\r\n\r\n`vb\r\n' Server: Timeout detection (default 120 seconds)\r\nServer.HeartbeatTimeout = 120\r\nServer.AutoHeartbeat = True\r\n\r\n' Client: Heartbeat keep-alive (default 50 seconds interval)\r\nClient.HeartbeatInterval = 50\r\nClient.AutoHeartbeat = True\r\n\r\n' Events\r\nPrivate Sub Server_ClientTimeout(Client As cWinsock)\r\n Debug.Print "Client timeout: " & Client.RemoteHostIP\r\n ' Already auto-disconnected, can do cleanup\r\nEnd Sub\r\n\r\nPrivate Sub Client_HeartbeatSent(Client As cWinsock)\r\n Debug.Print "Heartbeat sent"\r\nEnd Sub\r\n`\r\n\r\n**Key features:**\r\n- Embedded `cTimer` (10-second interval), `AutoHeartbeat = True` for full auto operation\r\n- Server: Polls client idle time, auto-disconnects zombie connections on timeout\r\n- Client: Smart skip - skips heartbeat when data send/receive exists, saves bandwidth\r\n- Each send/receive auto-updates `LastActivityTime`\r\n- New clients automatically inherit server heartbeat configuration\r\n- Heartbeat data goes through protocol encoding, does not pollute packet protocol state machine\r\n\r\n**Detailed description**: See [Packet Protocol and Heartbeat Mechanism](./packet-protocol.md), [Properties Reference](./properties.md), [Events Reference](./events.md)\r\n\r\n---\r\n\r\n### 1️⃣1️⃣ GetData Enhanced Methods 🎯\r\n\r\n**Problem scenario**: Getting data requires manual format conversion, code is tedious\r\n\r\n**cWinsock provides return value style convenience methods**, one-line code ready to use:\r\n\r\n`vb\r\n' Directly return text\r\nDebug.Print Client.GetDataText() ' ACP/GBK\r\nDebug.Print Client.GetDataTextUTF8() ' UTF-8\r\nDebug.Print Client.GetDataTextUnicode() ' Unicode\r\n\r\n' Directly return hexadecimal\r\nDebug.Print Client.GetDataHex() ' "48 65 6C 6C 6F"\r\n\r\n' Directly return byte array\r\nDim baData() As Byte\r\nbaData = Client.GetDataByteArray()\r\n\r\n' Condition check\r\nIf Client.GetDataText() = "Hello" Then\r\n Debug.Print "Received Hello"\r\nEnd If\r\n\r\n' Compatible with old method\r\nDim sData As String\r\nsData = Client.GetDataToString() ' Equivalent to GetDataText()\r\n`\r\n\r\n**Detailed description**: See [Methods Reference](./methods.md)\r\n\r\n---\r\n\r\n## Comparison with Native Winsock Control\r\n\r\n| Feature | Native Winsock Control | cWinsock Class |\r\n|---------|------------------------|-----------------|\r\n| **Object model** | Control array, managed via index | Pure class object, direct reference |\r\n| **Event parameters** | Pass index, need reverse lookup object | Directly pass client object |\r\n| **Client management** | Manually maintain index and controls | Automatically manage Clients collection |\r\n| **UDP server** | Connectionless, no client concept | Virtual client objects |\r\n| **Connection interception** | Need to manually close after Accept | Event parameter control, auto cleanup |\r\n| **Encoding support** | Fixed encoding | Multiple encoding options |\r\n| **Data types** | String/byte array | String/byte array + flexible conversion + return value convenience methods |\r\n| **Event unification** | Independent event per client | Server triggers all client events uniformly |\r\n| **Packet protocol** | Need manual sticky packet handling | Three built-in protocols, automatic packet/unpacket |\r\n| **Heartbeat keep-alive** | Need manual implementation | Built-in heartbeat manager, full auto drive |\r\n| **Resource management** | Need to manually Unload controls | Auto cleanup and garbage collection |\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### TCP Client Example\r\n\r\n`vb\r\nPrivate WithEvents m_oClient As cWinsock\r\n\r\nPrivate Sub Form_Load()\r\n Set m_oClient = New cWinsock\r\n m_oClient.Protocol = sckTCPProtocol\r\n m_oClient.Connect "127.0.0.1", 8080\r\nEnd Sub\r\n\r\nPrivate Sub m_oClient_Connect(Client As cWinsock)\r\n Debug.Print "Connected to server"\r\n Client.SendData "Hello, Server!"\r\nEnd Sub\r\n\r\nPrivate Sub m_oClient_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n Debug.Print "Received data: " & sData\r\nEnd Sub\r\n\r\nPrivate Sub Form_Unload(Cancel As Integer)\r\n m_oClient.Close_\r\nEnd Sub\r\n`\r\n\r\n### TCP Server Example\r\n\r\n`vb\r\nPrivate WithEvents m_oServer As cWinsock\r\n\r\nPrivate Sub Form_Load()\r\n Set m_oServer = New cWinsock\r\n m_oServer.Protocol = sckTCPProtocol\r\n m_oServer.Listen 8080\r\nEnd Sub\r\n\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n Debug.Print "New client connection: " & Client.RemoteHostIP\r\n ' DisConnect = False means accept connection\r\nEnd Sub\r\n\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n Debug.Print "Data from client " & Client.ClientId & ": " & sData\r\n \r\n ' Echo\r\n Client.SendData "Echo: " & sData\r\nEnd Sub\r\n\r\nPrivate Sub m_oServer_CloseEvent(Client As cWinsock)\r\n Debug.Print "Client disconnected: " & Client.ClientId\r\nEnd Sub\r\n\r\nPrivate Sub Form_Unload(Cancel As Integer)\r\n m_oServer.Close_\r\nEnd Sub\r\n`\r\n\r\n### UDP Communication Example\r\n\r\n`vb\r\nPrivate WithEvents m_oUdp As cWinsock\r\n\r\nPrivate Sub Form_Load()\r\n Set m_oUdp = New cWinsock\r\n m_oUdp.Protocol = sckUDPProtocol\r\n m_oUdp.Bind 8888\r\nEnd Sub\r\n\r\nPrivate Sub cmdSend_Click()\r\n m_oUdp.RemoteHost = "127.0.0.1"\r\n m_oUdp.RemotePort = 9999\r\n m_oUdp.SendData "Hello, UDP!"\r\nEnd Sub\r\n\r\nPrivate Sub m_oUdp_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n Debug.Print "Received UDP data (" & Client.RemoteHostIP & ":" & Client.RemotePort & "): " & sData\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## Architecture Design\r\n\r\n### Class Hierarchy\r\n\r\n`\r\ncWinsock (public class)\r\n ├── m_oSocket: cTlsSocket (internal encapsulation, supports TLS)\r\n ├── m_cClients: Collection (client collection)\r\n ├── m_oParentServer: cWinsock (parent server reference, clients only)\r\n ├── m_oPacketProtocol: cPacketProtocol (packet protocol handler)\r\n ├── m_oHeartbeat: cHeartbeat (heartbeat manager, embedded cTimer)\r\n └── Events: Connect, CloseEvent, ConnectionRequest, DataArrival, MessageArrival,\r\n SendProgress, SendComplete, Error, ClientTimeout, HeartbeatSent, ServerCertificateVerify\r\n`\r\n\r\n### Sub-module Classes\r\n\r\n| Class | File | Responsibility |\r\n|-------|------|---------------|\r\n| `cPacketProtocol` | `cPacketProtocol.cls` | Data packet protocol: delimiter/fixed-length/length-header, solves TCP fragmentation/sticky packet |\r\n| `cHeartbeat` | `cHeartbeat.cls` | Heartbeat management: embedded cTimer auto-drive, timeout detection, heartbeat keep-alive |\r\n\r\n### Object Relationship Diagram\r\n\r\n`\r\nServer object\r\n├── Socket (listening socket)\r\n├── Clients collection\r\n│ ├── Client object 1 (cWinsock)\r\n│ │ ├── Socket (independent connection)\r\n│ │ └── ParentServer → Server object\r\n│ ├── Client object 2 (cWinsock)\r\n│ │ ├── Socket (independent connection)\r\n│ │ └── ParentServer → Server object\r\n│ └── ...\r\n└── Event handler\r\n └── All client data triggered through this\r\n`\r\n\r\n### State Machine\r\n\r\n`\r\nsckClosed (0)\r\n ├─ Connect() → sckResolvingHost → sckHostResolved → sckConnecting → sckConnected (7)\r\n ├─ Listen() → sckListening (2)\r\n └─ Bind() → sckOpen (1)\r\n\r\nsckListening (2)\r\n └─ OnAccept → Create client → sckConnected\r\n\r\nsckConnected (7)\r\n └─ OnClose → sckClosed\r\n\r\nError → sckError (9)\r\n`\r\n\r\n---\r\n\r\n## Documentation Index\r\n\r\n| Document | Description |\r\n|----------|-------------|\r\n| [Packet Protocol and Heartbeat](./packet-protocol.md) | Detailed description and complete examples for packet protocol and heartbeat mechanism |\r\n| [Events Reference](./events.md) | Detailed explanation and usage examples for all events |\r\n| [Properties Reference](./properties.md) | Description, type, and purpose of all properties |\r\n| [Methods Reference](./methods.md) | Parameters, return values, and usage examples for all methods |\r\n| [Encoding Guide](./encoding.md) | Usage instructions and best practices for text encoding |\r\n| [TCP Programming](./tcp.md) | TCP client and server programming guide |\r\n| [UDP Programming](./udp.md) | UDP communication programming guide |\r\n| [Best Practices](./best-practices.md) | Solutions for common scenarios and performance optimization recommendations |\r\n| [TLS/SSL Support](./tls.md) | Configuration and usage instructions for TLS encrypted communication |\r\n| [Certificate Mode Details](../tls/overview.md) | Detailed introduction of three certificate sources (file/Windows store/memory) |\r\n| [Development Plan](./roadmap.md) | Project development progress tracking and future feature planning |\r\n\r\n---\r\n\r\n## License\r\n\r\nBased on VbAsyncSocket (wqweto@gmail.com)\r\n\r\n---\r\n\r\n## Author\r\n\r\n**cWinsock**: woeoio@qq.com \r\n**VbAsyncSocket**: wqweto@gmail.com\r\n\r\n---\r\n\r\n**Last Updated**: 2026-06-09\r\n](/en/vbman/winsock/overview.md) - [cWinsock Development Guide](/en/vbman/demo/14.Winsock.md) - [cWinsock Development Plan](/en/vbman/winsock/roadmap.md) - [cWinsock Encoding Guide](/en/vbman/winsock/encoding.md) - [cWinsock Events Reference](/en/vbman/winsock/events.md) - [cWinsock Methods Reference](/en/vbman/winsock/methods.md) - [cWinsock Properties Reference\r\n\r\n## 📋 Properties List\r\n\r\n| Property Name | Type | Access | Description |\r\n|---------------|------|--------|-------------|\r\n| `State` | WinsockState | Read-only | Current Socket state |\r\n| `Protocol` | WinsockProtocol | Read/Write | Protocol type (TCP/UDP) |\r\n| `RecvBuffer` | Byte() | Read/Write | Custom receive buffer |\r\n| `LocalPort` | Long | Read/Write | Local port |\r\n| `RemoteHost` | String | Read/Write | Remote hostname |\r\n| `RemotePort` | Long | Read/Write | Remote port |\r\n| `RemoteHostIP` | String | Read-only | Resolved remote IP address |\r\n| `LocalHostName` | String | Read-only | Local hostname |\r\n| `LocalIP` | String | Read-only | Local IP address |\r\n| `Tag` | String | Read/Write | User-defined tag (pure business identifier, no longer used internally) |\r\n| `ClientId` | Long | Read-only | Server-assigned unique connection identifier (auto-increment, no duplicates) |\r\n| `UserData` | Variant | Read/Write | User-defined data |\r\n| `SocketHandle` | Long | Read-only | Socket handle |\r\n| `BytesReceived` | Long | Read-only | Available data byte count |\r\n| `IsServer` | Boolean | Read-only | Whether in server mode |\r\n| `IsAcceptedClient` | Boolean | Read-only | Whether accepted by server |\r\n| `ParentServer` | cWinsock | Read-only | Parent server object (client only) |\r\n| `Clients` | Collection | Read-only | Collection of all connected clients (server only) |\r\n| `ClientCount` | Long | Read-only | Client connection count (server only) |\r\n| `CurrentUser` | Variant | Read/Write | Bound username (user binding feature) |\r\n| `CurrentUserToken` | String | Read/Write | User authentication token (user binding feature) |\r\n| `CurrentUserInfo` | cJson | Read/Write | User extended info (user binding feature) |\r\n| `CountUsers` | Long | Read-only | Current bound user count (user binding feature) |\r\n| `CountGroups` | Long | Read-only | Current group count (user binding feature) |\r\n| `PacketHandler` | cPacketProtocol | Read/Write | Packet protocol handler object (advanced configuration) |\r\n| `PacketProtocol` | PacketProtocolType | Read/Write | Packet protocol type (quick setup) |\r\n| `Delimiter` | String | Read/Write | Delimiter protocol delimiter (default vbCrLf) |\r\n| `FixedLength` | Long | Read/Write | Fixed-length protocol message length |\r\n| `HeaderBytes` | Long | Read/Write | Length-header protocol header bytes (2 or 4, default 4) |\r\n| `HeaderEndian` | EndianEnum | Read/Write | Length-header protocol byte order (default little-endian) |\r\n| `MaxPacketSize` | Long | Read/Write | Single packet max bytes (default 1MB), prevent malicious oversized packets |\r\n| `MaxBufferSize` | Long | Read/Write | Buffer accumulation limit (default 4MB), prevent memory exhaustion |\r\n| `Heartbeat` | cHeartbeat | Read-only | Heartbeat manager object (advanced configuration) |\r\n| `AutoHeartbeat` | Boolean | Read/Write | Enable/disable auto heartbeat (embedded cTimer) |\r\n| `HeartbeatTimeout` | Long | Read/Write | Server heartbeat timeout seconds (default 120) |\r\n| `HeartbeatInterval` | Long | Read/Write | Client heartbeat interval seconds (default 50) |\r\n| `HeartbeatData` | Byte() | Read/Write | Heartbeat packet content (default single byte 0) |\r\n| `IdleSeconds` | Long | Read-only | Current idle seconds |\r\n\r\n---\r\n\r\n## 🔄 State Property\r\n\r\n### Description\r\n\r\nReturns the current Socket state.\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get State() As WinsockState\r\n`\r\n\r\n### Return Values\r\n\r\n| Constant | Value | Description |\r\n|----------|-------|-------------|\r\n| `sckClosed` | 0 | Closed |\r\n| `sckOpen` | 1 | Open (after UDP binding) |\r\n| `sckListening` | 2 | Listening (TCP server) |\r\n| `sckConnectionPending` | 3 | Connection pending |\r\n| `sckResolvingHost` | 4 | Resolving hostname |\r\n| `sckHostResolved` | 5 | Hostname resolved |\r\n| `sckConnecting` | 6 | Connecting |\r\n| `sckConnected` | 7 | Connected |\r\n| `sckClosing` | 8 | Closing |\r\n| `sckError` | 9 | Error occurred |\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub cmdConnect_Click()\r\n If m_oClient.State = sckClosed Then\r\n m_oClient.Connect "127.0.0.1", 8080\r\n Else\r\n MsgBox "Socket not closed, current state: " & GetStateName(m_oClient.State)\r\n End If\r\nEnd Sub\r\n\r\nPrivate Function GetStateName(ByVal eState As WinsockState) As String\r\n Select Case eState\r\n Case sckClosed: GetStateName = "Closed"\r\n Case sckOpen: GetStateName = "Open"\r\n Case sckListening: GetStateName = "Listening"\r\n Case sckConnected: GetStateName = "Connected"\r\n Case sckClosing: GetStateName = "Closing"\r\n Case sckError: GetStateName = "Error"\r\n Case Else: GetStateName = "Unknown"\r\n End Select\r\nEnd Function\r\n`\r\n\r\n---\r\n\r\n## 🌐 Protocol Property\r\n\r\n### Description\r\n\r\nGets or sets the protocol type used by the Socket.\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get Protocol() As WinsockProtocol\r\nProperty Let Protocol(ByVal Value As WinsockProtocol)\r\n`\r\n\r\n### Values\r\n\r\n| Constant | Value | Description |\r\n|----------|-------|-------------|\r\n| `sckTCPProtocol` | 1 | TCP protocol (reliable, connection-oriented) |\r\n| `sckUDPProtocol` | 2 | UDP protocol (unreliable, connectionless) |\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set to TCP protocol\r\nm_oSocket.Protocol = sckTCPProtocol\r\n\r\n' Set to UDP protocol\r\nm_oSocket.Protocol = sckUDPProtocol\r\n\r\n' Check current protocol\r\nIf m_oSocket.Protocol = sckTCPProtocol Then\r\n Debug.Print "Using TCP protocol"\r\nElse\r\n Debug.Print "Using UDP protocol"\r\nEnd If\r\n`\r\n\r\n### ⚠️ Notes\r\n\r\n- Can only be modified when `State = sckClosed`\r\n- After modification, need to call `Connect()`, `Listen()` or `Bind()` again\r\n\r\n---\r\n\r\n## 📦 RecvBuffer Property\r\n\r\n### Description\r\n\r\nSets or gets custom receive buffer. Usually used for advanced scenarios.\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Let RecvBuffer(ByRef Value() As Byte)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set custom buffer\r\nDim baCustomBuffer() As Byte\r\nReDim baCustomBuffer(0 To 8191) ' 8KB buffer\r\nm_oSocket.RecvBuffer = baCustomBuffer\r\n`\r\n\r\n---\r\n\r\n## 🔌 LocalPort Property\r\n\r\n### Description\r\n\r\nGets or sets local port number.\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get LocalPort() As Long\r\nProperty Let LocalPort(ByVal Value As Long)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set local port (must be done before calling Connect/Listen/Bind)\r\nm_oServer.LocalPort = 8080\r\nm_oServer.Listen\r\n\r\n' Get actual bound port\r\nDebug.Print "Local port: " & m_oSocket.LocalPort\r\n`\r\n\r\n### ⚠️ Notes\r\n\r\n- Can only be set when `State = sckClosed`\r\n- Range: 0-65535\r\n- 0 means auto-assigned by system\r\n\r\n---\r\n\r\n## 🌍 RemoteHost Property\r\n\r\n### Description\r\n\r\nGets or sets remote hostname (domain name or IP).\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get RemoteHost() As String\r\nProperty Let RemoteHost(ByVal Value As String)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set remote host (can use domain name)\r\nm_oClient.RemoteHost = "example.com"\r\nm_oClient.RemotePort = 80\r\nm_oClient.Connect\r\n\r\n' Use IP address\r\nm_oClient.RemoteHost = "192.168.1.100"\r\nm_oClient.RemotePort = 8080\r\nm_oClient.Connect\r\n\r\n' Get remote hostname\r\nDebug.Print "Remote host: " & m_oClient.RemoteHost\r\n`\r\n\r\n---\r\n\r\n## 🔢 RemotePort Property\r\n\r\n### Description\r\n\r\nGets or sets remote port number.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get RemotePort() As Long\r\nProperty Let RemotePort(ByVal Value As Long)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set remote port\r\nm_oClient.RemotePort = 8080\r\n\r\n' Get remote port\r\nDebug.Print "Remote port: " & m_oClient.RemotePort\r\n`\r\n\r\n---\r\n\r\n## 🖥️ RemoteHostIP Property\r\n\r\n### Description\r\n\r\nGets resolved remote IP address (read-only).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get RemoteHostIP() As String\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub m_oClient_Connect(Client As cWinsock)\r\n Debug.Print "Connection successful!"\r\n Debug.Print "Hostname: " & Client.RemoteHost\r\n Debug.Print "IP address: " & Client.RemoteHostIP\r\n Debug.Print "Port: " & Client.RemotePort\r\nEnd Sub\r\n`\r\n\r\n### Special Case: UDP Server Virtual Client\r\n\r\n`vb\r\nPrivate Sub m_oUdp_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n ' In UDP server mode, virtual client's RemoteHostIP returns sender IP\r\n Debug.Print "Received from " & Client.RemoteHostIP & ":" & Client.RemotePort\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 💻 LocalHostName Property\r\n\r\n### Description\r\n\r\nGets local hostname.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get LocalHostName() As String\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nDebug.Print "Local hostname: " & m_oSocket.LocalHostName\r\n`\r\n\r\n---\r\n\r\n## 🌐 LocalIP Property\r\n\r\n### Description\r\n\r\nGets local IP address.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get LocalIP() As String\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nDebug.Print "Local IP: " & m_oSocket.LocalIP\r\n`\r\n\r\n---\r\n\r\n## 🏷️ Tag Property\r\n\r\n### Description\r\n\r\nUser-defined tag for business identification or grouping. Can be freely read/written, **internal management no longer relies on this property**.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get Tag() As String\r\nProperty Let Tag(ByVal Value As String)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set business tag for client in ConnectionRequest\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n Client.Tag = "Client-" & Client.RemoteHostIP\r\n Debug.Print "New client Tag: " & Client.Tag\r\nEnd Sub\r\n\r\n' Find client by Tag (need to iterate manually)\r\nPrivate Function FindClientByTag(ByVal sTag As String) As cWinsock\r\n Dim oClient As cWinsock\r\n For Each oClient In m_oServer.Clients\r\n If oClient.Tag = sTag Then\r\n Set FindClientByTag = oClient\r\n Exit Function\r\n End If\r\n Next\r\n Set FindClientByTag = Nothing\r\nEnd Function\r\n`\r\n\r\n---\r\n\r\n## 🆔 ClientId Property\r\n\r\n### Description\r\n\r\nServer-assigned unique connection identifier (read-only). Auto-increment number, starting from `1`, not reused after disconnect, never duplicates.\r\n\r\n- Server's own (Listen socket) `ClientId = 0`.\r\n- Both TCP and UDP client connections are auto-assigned.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get ClientId() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Identify client in ConnectionRequest or DataArrival\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n Debug.Print "New client connected, ID: " & Client.ClientId & " from " & Client.RemoteHostIP\r\nEnd Sub\r\n\r\n' Use ID for logging or key mapping\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Debug.Print "Client #" & Client.ClientId & " sent " & bytesTotal & " bytes"\r\nEnd Sub\r\n`\r\n\r\n| Feature | Description |\r\n|---------|-------------|\r\n| Readability | `#1`, `#42` instantly recognizable |\r\n| Uniqueness | Monotonically increasing, no duplicates within lifecycle |\r\n| Type | `Long`, easy to compare and store |\r\n\r\n---\r\n\r\n## 💾 UserData Property\r\n\r\n### Description\r\n\r\nUser-defined data storage, can store any type of data.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get UserData() As Variant\r\nProperty Let UserData(ByVal Value As Variant)\r\nProperty Set UserData(ByVal Value As Variant)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Store string\r\nm_oClient.UserData = "User info: Zhang San"\r\n\r\n' Store number\r\nm_oClient.UserData = 12345\r\n\r\n' Store object\r\nDim oUserInfo As New CUserInfo\r\noUserInfo.Name = "Zhang San"\r\noUserInfo.Age = 25\r\nSet m_oClient.UserData = oUserInfo\r\n\r\n' Read data\r\nDim sInfo As String\r\nsInfo = m_oClient.UserData\r\nDebug.Print sInfo\r\n\r\n' Read object\r\nDim oUserData As CUserInfo\r\nSet oUserData = m_oClient.UserData\r\nDebug.Print oUserInfo.Name & ", " & oUserData.Age\r\n`\r\n\r\n### Advanced Usage: Client Session Data\r\n\r\n`vb\r\nPrivate Type tSessionData\r\n LoginTime As Date\r\n LastActivity As Date\r\n LoginAttempts As Long\r\n Authenticated As Boolean\r\nEnd Type\r\n\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n Dim tSession As tSessionData\r\n tSession.LoginTime = Now\r\n tSession.LastActivity = Now\r\n tSession.LoginAttempts = 0\r\n tSession.Authenticated = False\r\n \r\n Client.UserData = tSession\r\nEnd Sub\r\n\r\nPrivate Sub CheckSessionTimeout()\r\n Dim oClient As cWinsock\r\n Dim tSession As tSessionData\r\n \r\n For Each oClient In m_oServer.Clients\r\n tSession = oClient.UserData\r\n If DateDiff("s", tSession.LastActivity, Now) > 300 Then ' 5 minutes of inactivity\r\n Debug.Print "Session timeout, disconnecting: " & oClient.ClientId\r\n oClient.Close_\r\n End If\r\n Next\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 🔑 SocketHandle Property\r\n\r\n### Description\r\n\r\nGets underlying Socket handle (read-only).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get SocketHandle() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Get Socket handle\r\nDebug.Print "Socket handle: " & m_oSocket.SocketHandle\r\n\r\n' Used for advanced operations (e.g., Win32 API interaction)\r\r\nIf m_oSocket.SocketHandle <> 0 Then\r\n Call SomeWin32Function(m_oSocket.SocketHandle)\r\nEnd If\r\n`\r\n\r\n---\r\n\r\n## 📊 BytesReceived Property\r\n\r\n### Description\r\n\r\nGets available byte count in receive buffer (read-only).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get BytesReceived() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub m_oClient_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Debug.Print "Event notification: " & bytesTotal & " bytes"\r\n Debug.Print "Buffer total: " & Client.BytesReceived & " bytes"\r\n \r\n ' Read only partial data\r\n If Client.BytesReceived > 100 Then\r\n Dim sData As String\r\n Client.GetData sData, vbString, 100 ' Read only first 100 bytes\r\n Debug.Print "Read partial data: " & sData\r\n End If\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 🏢 IsServer Property\r\n\r\n### Description\r\n\r\nDetermines if current object is in server mode (read-only).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get IsServer() As Boolean\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n If Client.IsServer Then\r\n Debug.Print "Data from server"\r\n Else\r\n Debug.Print "Data from client"\r\n End If\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 🔗 IsAcceptedClient Property\r\n\r\n### Description\r\n\r\nDetermines if current object is a client accepted by server (read-only).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get IsAcceptedClient() As Boolean\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub SomeFunction(oSocket As cWinsock)\r\n If oSocket.IsAcceptedClient Then\r\n Debug.Print "This is a client accepted by server"\r\n Debug.Print "Parent server: " & oSocket.ParentServer.Tag\r\n Else\r\n Debug.Print "This is an independent client or server object"\r\n End If\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 👆 ParentServer Property\r\n\r\n### Description\r\n\r\nGets parent server object (only valid for server-accepted clients).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get ParentServer() As cWinsock\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n ' Server sets ParentServer\r\n ' Client can access parent server\r\n \r\n Debug.Print "New client's parent server: " & Client.ParentServer.Tag\r\nEnd Sub\r\n`\r\n\r\n### Advanced Usage: Client Broadcast Message\r\n\r\n`vb\r\n' In some client event, broadcast to other clients through parent server\r\nPrivate Sub ClientBroadcastToOthers(ByVal oSender As cWinsock, ByVal sMessage As String)\r\n Dim oClient As cWinsock\r\n For Each oClient In oSender.ParentServer.Clients\r\n If Not oClient Is oSender Then ' Don't send to self\r\n oClient.SendData sMessage\r\n End If\r\n Next\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 👥 Clients Property\r\n\r\n### Description\r\n\r\nGets collection of all connected clients (only valid for server objects).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get Clients() As Collection\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Iterate through all clients\r\nPrivate Sub ListAllClients()\r\n Debug.Print "Current connections: " & m_oServer.ClientCount\r\n \r\n Dim oClient As cWinsock\r\n For Each oClient In m_oServer.Clients\r\n Debug.Print oClient.Tag & ": " & oClient.RemoteHostIP & ":" & oClient.RemotePort\r\n Next\r\nEnd Sub\r\n\r\n' Find specific client\r\nPrivate Function FindClientByIP(ByVal sIP As String) As cWinsock\r\n Dim oClient As cWinsock\r\n For Each oClient In m_oServer.Clients\r\n If oClient.RemoteHostIP = sIP Then\r\n Set FindClientByIP = oClient\r\n Exit Function\r\n End If\r\n Next\r\n Set FindClientByIP = Nothing\r\nEnd Function\r\n\r\n' Broadcast to all clients\r\nPrivate Sub BroadcastToAll(ByVal sMessage As String)\r\n Dim oClient As cWinsock\r\n For Each oClient In m_oServer.Clients\r\n On Error Resume Next\r\n oClient.SendData sMessage\r\n On Error GoTo 0\r\n Next\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 🔢 ClientCount Property\r\n\r\n### Description\r\n\r\nGets current number of connected clients (read-only, only valid for server objects).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get ClientCount() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Display connection count\r\nlblClientCount.Caption = "Current connections: " & m_oServer.ClientCount\r\n\r\n' Limit maximum connections\r\nPrivate Sub m_oServer_ConnectionRequest(Client As cWinsock, ByRef DisConnect As Boolean)\r\n If m_oServer.ClientCount >= m_lMaxClients Then\r\n Debug.Print "Maximum connection limit reached: " & m_lMaxClients\r\n DisConnect = True\r\n End If\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 👤 CurrentUser Property\r\n\r\n### Description\r\n\r\nGets or sets bound username (for user binding feature). After binding user with `BindUser` method, this property is automatically set to the username.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nPublic CurrentUser As Variant\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Bind user when client connects\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Dim sData As String\r\n Client.GetData sData\r\n \r\n If Left$(sData, 6) = "LOGIN:" Then\r\n Dim sUsername As String\r\n sUsername = Mid$(sData, 7)\r\n \r\n ' Bind user\r\n m_oServer.BindUser sUsername, Client\r\n \r\n ' Verify binding successful\r\n Debug.Print "Client.CurrentUser = " & Client.CurrentUser\r\n End If\r\nEnd Sub\r\n\r\n' Check if user is logged in\r\nPrivate Sub CheckUserLogin(ByVal oClient As cWinsock)\r\n If LenB(CStr(oClient.CurrentUser)) = 0 Then\r\n Debug.Print "User not logged in"\r\n Else\r\n Debug.Print "Current user: " & oClient.CurrentUser\r\n End If\r\nEnd Sub\r\n`\r\n\r\n### Difference from Tag Property\r\n\r\n| Property | Purpose | Setting Method |\r\n|----------|---------|----------------|\r\n| `Tag` | User-defined business identifier | Manually set |\r\n| `ClientId` | System-assigned connection number | Auto-assigned by server |\r\n| `CurrentUser` | Identifies logged-in user | Bound via `BindUser` |\r\n\r\n### Auto Cleanup\r\n\r\nWhen client disconnects (calls `Close_` or object is destroyed), system automatically unbinds user, no manual handling needed.\r\n\r\n---\r\n\r\n## 🔑 CurrentUserToken Property\r\n\r\n### Description\r\n\r\nGets or sets user authentication token (for user binding feature). When binding user with `BindUser` method and passing `Token` parameter, this property is automatically set to the corresponding value.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nPublic CurrentUserToken As String\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Bind user with Token\r\nm_oServer.BindUser "alice", Client, "jwt_token_xyz123"\r\n\r\n' Verify Token later\r\nIf Client.CurrentUserToken = "jwt_token_xyz123" Then\r\n Debug.Print "Token verification passed"\r\nEnd If\r\n\r\n' Get current user's Token\r\nDebug.Print "User " & Client.CurrentUser & "'s Token: " & Client.CurrentUserToken\r\n`\r\n\r\n---\r\n\r\n## 📋 CurrentUserInfo Property\r\n\r\n### Description\r\n\r\nGets or sets user extended info (for user binding feature). When binding user with `BindUser` method and passing `Info` parameter (cJson object), this property is automatically set to the corresponding value. Can be used to store additional user metadata such as login time, IP address, permission level, etc.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nPublic CurrentUserInfo As cJson\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Bind user with extended info\r\nDim oInfo As New cJson\r\noInfo.Add "loginTime", Now\r\noInfo.Add "ip", Client.RemoteHostIP\r\noInfo.Add "role", "admin"\r\nm_oServer.BindUser "alice", Client, , oInfo\r\n\r\n' Read user extended info\r\nDebug.Print "Login time: " & Client.CurrentUserInfo.Item("loginTime")\r\nDebug.Print "Role: " & Client.CurrentUserInfo.Item("role")\r\n\r\n' Dynamically add info\r\nClient.CurrentUserInfo.Add "lastActivity", Now\r\n`\r\n\r\n### Difference from UserData\r\n\r\n| Property | Purpose | Lifecycle |\r\n|----------|---------|-----------|\r\n| `UserData` | General custom data storage | Manually managed by user |\r\n| `CurrentUserInfo` | User-bound structured info (JSON) | Auto-managed with `BindUser`/`UnbindUser` |\r\n\r\n---\r\n\r\n## 🔢 CountUsers Property\r\n\r\n### Description\r\n\r\nGets current number of bound users (read-only). Users bound via `BindUser` method are counted.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get CountUsers() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Display current bound user count\r\nDebug.Print "Current bound users: " & m_oServer.CountUsers\r\n\r\n' Monitor user login status\r\nPrivate Sub UpdateUserCount()\r\n lblUserCount.Caption = "Online users: " & m_oServer.CountUsers\r\nEnd Sub\r\n\r\n' Check in DataArrival\r\nPrivate Sub m_oServer_DataArrival(Client As cWinsock, ByVal bytesTotal As Long)\r\n Debug.Print "Current total bound users: " & m_oServer.CountUsers\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 👥 CountGroups Property\r\n\r\n### Description\r\n\r\nGets current number of groups (read-only). Groups created via `AddGroup` method are counted.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get CountGroups() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Display current group count\r\nDebug.Print "Current group count: " & m_oServer.CountGroups\r\n\r\n' Create default groups on initialization\r\nPrivate Sub InitializeGroups()\r\n If m_oServer.CountGroups = 0 Then\r\n m_oServer.AddGroup "Default"\r\n m_oServer.AddGroup "Admins"\r\n End If\r\nEnd Sub\r\n`\r\n\r\n---\r\n\r\n## 📦 PacketHandler Property\r\n\r\n### Description\r\n\r\nGets or sets packet protocol handler object. Each cWinsock instance holds independent protocol instance, multi-client互不干扰.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get PacketHandler() As cPacketProtocol\r\nProperty Set PacketHandler(ByVal Value As cPacketProtocol)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Advanced configuration: directly operate protocol object\r\nDim oProtocol As cPacketProtocol\r\nSet oProtocol = New cPacketProtocol\r\noProtocol.ProtocolType = ppLengthHeader\r\noProtocol.HeaderBytes = 4\r\r\noProtocol.Endian = eeBigEndian\r\n\r\nSet m_oServer.PacketHandler = oProtocol\r\n`\r\n\r\n---\r\n\r\n## 📦 PacketProtocol Property\r\n\r\n### Description\r\n\r\nQuick setup for packet protocol type. Setting automatically creates protocol handler (if not existing). Set to `ppNone` to disable protocol.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get PacketProtocol() As PacketProtocolType\r\r\nProperty Let PacketProtocol(ByVal Value As PacketProtocolType)\r\n`\r\n\r\n### Values\r\n\r\n| Constant | Value | Description |\r\n|----------|-------|-------------|\r\n| `ppNone` | 0 | No protocol (default) |\r\n| `ppDelimiter` | 1 | Character delimiter protocol |\r\n| `ppFixedLength` | 2 | Fixed-length protocol |\r\n| `ppLengthHeader` | 3 | Length-header protocol |\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Set delimiter protocol\r\nm_oServer.PacketProtocol = ppDelimiter\r\nm_oServer.Delimiter = vbCrLf\r\n\r\n' Set length-header protocol\r\nm_oServer.PacketProtocol = ppLengthHeader\r\nm_oServer.HeaderBytes = 4\r\n\r\n' Disable protocol\r\nm_oServer.PacketProtocol = ppNone\r\n`\r\n\r\n---\r\n\r\n## 📦 Delimiter Property\r\n\r\n### Description\r\n\r\nSets or gets delimiter protocol delimiter. Default is `vbCrLf`. Only effective when `PacketProtocol = ppDelimiter`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get Delimiter() As String\r\r\nProperty Let Delimiter(ByVal Value As String)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Use newline as delimiter (suitable for text line protocol)\r\nm_oServer.PacketProtocol = ppDelimiter\r\nm_oServer.Delimiter = vbCrLf\r\n\r\n' Use null character as delimiter (suitable for binary-text mixed protocol)\r\nm_oServer.Delimiter = vbNullChar\r\n\r\n' Use custom delimiter\r\r\nm_oServer.Delimiter = ""\r\n`\r\n\r\n---\r\n\r\n## 📦 FixedLength Property\r\n\r\n### Description\r\n\r\nSets or gets fixed-length protocol message length. Only effective when `PacketProtocol = ppFixedLength`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get FixedLength() As Long\r\nProperty Let FixedLength(ByVal Value As Long)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Each message fixed 256 bytes\r\nm_oServer.PacketProtocol = ppFixedLength\r\nm_oServer.FixedLength = 256\r\n`\r\n\r\n---\r\n\r\n## 📦 HeaderBytes Property\r\n\r\n### Description\r\n\r\nSets or gets length-header protocol header bytes. 2 means Integer (max 65535 bytes), 4 means Long. Default is 4. Only effective when `PacketProtocol = ppLengthHeader`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get HeaderBytes() As Long\r\nProperty Let HeaderBytes(ByVal Value As Long)\r\n`\r\n\r\n### Values\r\n\r\n| Value | Description | Max Message Length |\r\n|-------|-------------|-------------------|\r\n| 2 | 2-byte header (Unsigned Integer) | 65,535 bytes |\r\n| 4 | 4-byte header (Unsigned Long) | 2,147,483,647 bytes |\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Small messages use 2-byte header to save bandwidth\r\nm_oServer.PacketProtocol = ppLengthHeader\r\nm_oServer.HeaderBytes = 2\r\n\r\n' Large messages use 4-byte header\r\nm_oServer.HeaderBytes = 4\r\n`\r\n\r\n---\r\n\r\n## 📦 HeaderEndian Property\r\n\r\n### Description\r\n\r\nSets or gets length-header protocol byte order. Default is little-endian (`eeLittleEndian`). Only effective when `PacketProtocol = ppLengthHeader`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\r\nProperty Get HeaderEndian() As EndianEnum\r\nProperty Let HeaderEndian(ByVal Value As EndianEnum)\r\n`\r\n\r\n### Values\r\n\r\n| Constant | Value | Description |\r\n|----------|-------|-------------|\r\n| `eeLittleEndian` | 0 | Little-endian (default, x86/x64) |\r\n| `eeBigEndian` | 1 | Big-endian (network byte order) |\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Communicate with Java/network protocols (usually use big-endian)\r\nm_oServer.PacketProtocol = ppLengthHeader\r\nm_oServer.HeaderEndian = eeBigEndian\r\n`\r\n\r\n---\r\n\r\n## 📦 MaxPacketSize Property\r\n\r\n### Description\r\n\r\nSingle packet max byte limit. During length-header protocol parsing, if declared message length exceeds this value, error is thrown and packet discarded. Prevents malicious oversized packet declarations exhausting memory.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get MaxPacketSize() As Long\r\nProperty Let MaxPacketSize(ByVal Value As Long)\r\n`\r\n\r\n### Default Value\r\n\r\n1MB (1048576 bytes)\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Adjust max packet limit\r\nm_oServer.PacketProtocol = ppLengthHeader\r\r\nm_oServer.MaxPacketSize = 524288 ' 512KB\r\n\r\n' New clients automatically inherit this configuration\r\n`\r\n\r\n### Notes\r\n\r\n- Only effective for `ppLengthHeader` protocol\r\n- Throws clear error message when exceeded\r\n- New clients automatically inherit server configuration\r\n\r\n---\r\n\r\n## 📦 MaxBufferSize Property\r\n\r\n### Description\r\n\r\nReceive buffer accumulation limit. Decode checks before merging buffer, if exceeded, error is thrown and packet discarded. Prevents large amounts of incomplete packets slowly consuming memory (e.g., attacker sending many incomplete packets).\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get MaxBufferSize() As Long\r\nProperty Let MaxBufferSize(ByVal Value As Long)\r\n`\r\n\r\n### Default Value\r\n\r\n4MB (4194304 bytes)\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Adjust buffer limit\r\nm_oServer.PacketProtocol = ppLengthHeader\r\nm_oServer.MaxBufferSize = 8388608 ' 8MB\r\n`\r\n\r\n### Notes\r\n\r\n- Effective for all protocol types\r\n- Throws clear error message when exceeded\r\n- New clients automatically inherit server configuration\r\n\r\n---\r\n\r\n## 💓 Heartbeat Property\r\n\r\n### Description\r\n\r\\r\nGets heartbeat manager object for advanced configuration. Heartbeat manager embeds `cTimer` auto-drive, no external timer needed.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get Heartbeat() As cHeartbeat\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Advanced configuration\r\nIf Not m_oServer.Heartbeat Is Nothing Then\r\n Debug.Print "Heartbeat sent count: " & m_oServer.Heartbeat.HeartbeatCount\r\n Debug.Print "Timer interval: " & m_oServer.Heartbeat.TimerInterval & "ms"\r\nEnd If\r\n`\r\n\r\n---\r\n\r\n## 💓 AutoHeartbeat Property\r\n\r\n### Description\r\n\r\nEnable or disable auto heartbeat. When enabled, embedded `cTimer` auto-drive, no external timer or `PollHeartbeat()` call needed.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get AutoHeartbeat() As Boolean\r\nProperty Let AutoHeartbeat(ByVal Value As Boolean)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Server: Enable heartbeat detection\r\nm_oServer.AutoHeartbeat = True\r\nm_oServer.HeartbeatTimeout = 120 ' 2 minutes timeout\r\n\r\n' Client: Enable heartbeat keep-alive\r\nm_oClient.AutoHeartbeat = True\r\r\nm_oClient.HeartbeatInterval = 50 ' 50 seconds interval\r\n\r\n' Disable heartbeat\r\nm_oServer.AutoHeartbeat = False\r\n`\r\n\r\n---\r\n\r\n## 💓 HeartbeatTimeout Property\r\n\r\n### Description\r\n\r\nServer heartbeat timeout seconds. Client idle time exceeding this value will be auto-disconnected. Default 120 seconds (2 minutes). Only effective in server mode with `AutoHeartbeat = True`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\r\nProperty Get HeartbeatTimeout() As Long\r\nProperty Let HeartbeatTimeout(ByVal Value As Long)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nm_oServer.AutoHeartbeat = True\r\r\nm_oServer.HeartbeatTimeout = 180 ' 3 minutes timeout\r\n`\r\n\r\n---\r\n\r\n## 💓 HeartbeatInterval Property\r\n\r\n### Description\r\n\r\nClient heartbeat interval seconds. When idle time exceeds this value, client auto-sends heartbeat packet. Default 50 seconds. Only effective in client mode with `AutoHeartbeat = True`.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get HeartbeatInterval() As Long\r\nProperty Let HeartbeatInterval(ByVal Value As Long)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\nm_oClient.AutoHeartbeat = True\r\nm_oClient.HeartbeatInterval = 30 ' 30 seconds no activity then send heartbeat\r\n`\r\n\r\n---\r\n\r\n## 💓 HeartbeatData Property\r\n\r\n### Description\r\n\r\nHeartbeat packet content (byte array). Default is single byte `&H00`. Can customize heartbeat packet format based on protocol.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get HeartbeatData() As Byte()\r\nProperty Let HeartbeatData(ByRef Value() As Byte)\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Custom heartbeat packet content\r\nDim baHB(0 To 3) As Byte\r\nbaHB(0) = &HFF\r\nbaHB(1) = &H0\r\nbaHB(2) = &H0\r\nbaHB(3) = &HFF\r\nm_oClient.HeartbeatData = baHB\r\n`\r\n\r\n---\r\n\r\n## 💓 IdleSeconds Property\r\n\r\n### Description\r\n\r\nCurrent connection idle seconds (read-only). Calculated from last send/receive time. Can be used to determine connection activity level.\r\n\r\n\r\n\r\n### Syntax\r\n\r\n`vb\r\nProperty Get IdleSeconds() As Long\r\n`\r\n\r\n### Usage Example\r\n\r\n`vb\r\n' Check client activity level\r\nDim oClient As cWinsock\r\r\nFor Each oClient In m_oServer.Clients\r\n Debug.Print "Client #" & oClient.ClientId & " idle: " & oClient.IdleSeconds & " seconds"\r\nNext\r\n`\r\n\r\n---\r\n\r\n## 📌 Property Usage Scenarios Summary\r\n\r\n### Common Client Properties\r\n\r\n`vb\r\n' Set before connecting\r\nm_oClient.Protocol = sckTCPProtocol\r\nm_oClient.RemoteHost = "192.168.1.100"\r\nm_oClient.RemotePort = 8080\r\nm_oClient.Connect\r\n\r\n' Get after connecting\r\nDebug.Print "IP: " & m_oClient.RemoteHostIP\r\nDebug.Print "Port: " & m_oClient.RemotePort\r\r\nDebug.Print "State: " & m_oClient.State\r\n\r\n' Custom tags\r\nm_oClient.Tag = "Client-001"\r\r\nm_oClient.UserData = "User info"\r\n`\r\n\r\n### Common Server Properties\r\n\r\n`vb\r\n' Start server\r\nm_oServer.Protocol = sckTCPProtocol\r\nm_oServer.LocalPort = 8080\r\nm_oServer.Listen\r\n\r\n' Set packet protocol\r\nm_oServer.PacketProtocol = ppDelimiter\r\nm_oServer.Delimiter = vbCrLf\r\n\r\n' Set heartbeat\r\nm_oServer.AutoHeartbeat = True\r\nm_oServer.HeartbeatTimeout = 120\r\n\r\n' Manage clients\r\nDebug.Print "Connections: " & m_oServer.ClientCount\r\n\r\nDim oClient As cWinsock\r\r\nFor Each oClient In m_oServer.Clients\r\r\n Debug.Print "Client #" & oClient.ClientId & ": " & oClient.RemoteHostIP & " (idle " & oClient.IdleSeconds & " seconds)"\r\n oClient.SendData "Broadcast message"\r\nNext\r\n`\r\n\r\n---\r\n\r\n**Last Updated**: 2026-06-19\r\n](/en/vbman/winsock/properties.md) - [cWinsock Synchronous Methods Detailed Guide](/en/vbman/winsock/sync-methods.md) - [cWinsock TCP 编程指南](/zh/vbman/winsock/tcp.md) - [cWinsock TCP Programming Guide](/en/vbman/winsock/tcp.md) - [cWinsock TLS/SSL 支持](/zh/vbman/winsock/tls.md) - [cWinsock TLS/SSL Support](/en/vbman/winsock/tls.md) - [cWinsock UDP 编程指南](/zh/vbman/winsock/udp.md) - [cWinsock UDP Programming Guide](/en/vbman/winsock/udp.md) - [cWinsock User Binding and Group Management](/en/vbman/winsock/binding.md) - [Data Binding Guide - BindUI / BindData / SetData](/en/vbman2/webview2/bindui.md) - [Database Integration](/en/vbman/httpserver/database.md) - [Delay 方法参考](/zh/vbman/delay/methods.md) - [Delay 属性参考](/zh/vbman/delay/properties.md) - [Delay 延时组件概述](/zh/vbman/delay/overview.md) - [Delay Component Overview](/en/vbman/delay/overview.md) - [Delay Methods Reference](/en/vbman/delay/methods.md) - [Delay Properties Reference](/en/vbman/delay/properties.md) - [Development Log](/en/vbman/start/devlog.md) - [Dialog 对话框组件概述](/zh/vbman/dialog/overview.md) - [Dialog 方法参考](/zh/vbman/dialog/methods.md) - [Dialog 属性参考](/zh/vbman/dialog/properties.md) - [Dialog Component Overview](/en/vbman/dialog/overview.md) - [Dialog Methods Reference](/en/vbman/dialog/methods.md) - [Dialog Properties Reference](/en/vbman/dialog/properties.md) - [Donation](/en/donate.md) - [DTPicker Control](/en/packages/vbccr/datetime/dtpicker.md): DTPicker Control - VBCCR Development Manual, complete API reference based on source code - [End User License Agreement](/en/EULA.md) - [Examples](/en/vbman/Toast/examples.md) - [Execute Operations](/en/vbman/database/execute.md) - [FAQ](/en/vbman/Toast/faq.md) - [FAQ - Frequently Asked Questions](/en/vbman2/webview2/faq.md) - [Featured Cases](/en/cases/featured-cases.md): VBMAN featured user case showcase - [FontCombo Control](/en/packages/vbccr/lists/fontcombo.md): FontCombo Control - VBCCR Development Manual, complete API reference based on source code - [FrameW Control](/en/packages/vbccr/system/framew.md): FrameW Control - VBCCR Development Manual, Complete API Reference Based on Source Code - [Hash 操作](/zh/vbman/redis/hash-operations.md) - [Hash 哈希方法参考](/zh/vbman/crypt/hash/methods.md) - [Hash 哈希组件概述](/zh/vbman/crypt/hash/overview.md) - [Hash Component Overview](/en/vbman/crypt/hash/overview.md) - [Hash Methods Reference](/en/vbman/crypt/hash/methods.md) - [Hash Operations](/en/vbman/redis/hash-operations.md) - [HMAC 方法参考](/zh/vbman/crypt/hmac/methods.md) - [HMAC 组件概述](/zh/vbman/crypt/hmac/overview.md) - [HMAC Component Overview](/en/vbman/crypt/hmac/overview.md) - [HMAC Methods Reference](/en/vbman/crypt/hmac/methods.md) - [Host Adaptation Guide - VB6/Excel/Access Multi-Host Integration](/en/vbman2/webview2/hosting.md) - [HotKey Control](/en/packages/vbccr/text/hotkey.md): HotKey Control - VBCCR Development Manual, complete API reference based on source code - [ImageCombo Control](/en/packages/vbccr/lists/imagecombo.md): ImageCombo Control - VBCCR Development Manual, complete API reference based on source code - [ImageList Control](/en/packages/vbccr/system/imagelist.md): ImageList Control - VBCCR Development Manual, Complete API Reference Based on Source Code - [IP 地址控件(IPAddress)](/zh/packages/vbccr/lists/ipaddress.md): IP 地址控件(IPAddress) - VBCCR 开发手册,基于源码的完整 API 参考 - [IPAddress Control](/en/packages/vbccr/lists/ipaddress.md): IPAddress Control - VBCCR Development Manual, complete API reference based on source code - [LabelW Control](/en/packages/vbccr/text/labelw.md): LabelW Control - VBCCR Development Manual, complete API reference based on source code - [Lightweight IoT Cloud Platform](/en/cases/case-iot-cloud.md): Read/write data with just a URL - A lightweight IoT data storage service built on VBMAN HttpServer - [LinkLabel Control](/en/packages/vbccr/text/linklabel.md): LinkLabel Control - VBCCR Development Manual, complete API reference based on source code - [List 操作](/zh/vbman/redis/list-operations.md) - [List Operations](/en/vbman/redis/list-operations.md) - [ListBoxW Control](/en/packages/vbccr/lists/listboxw.md): ListBoxW Control - VBCCR Development Manual, complete API reference based on source code - [ListView Control](/en/packages/vbccr/views/listview.md): ListView Control - VBCCR Developer Reference, complete API documentation based on source code - [Markdown Extension Examples](/demo/markdown-examples.md) - [MCIWnd 控件(MCIWnd)](/zh/packages/vbccr/system/mciwnd.md): MCIWnd 控件(MCIWnd) - VBCCR 开发手册,基于源码的完整 API 参考 - [MCIWnd Control](/en/packages/vbccr/system/mciwnd.md): MCIWnd Control - VBCCR Development Manual, Complete API Reference Based on Source Code - [Memory Certificate Collection Mode (TlsCertMemory)](/en/vbman/tls/certmemory.md) - [Middleware System Guide](/en/vbman/httpserver/middleware.md) - [Modbus 进阶应用](/zh/vbman/modbus/advanced.md) - [Modbus 类库开发文档](/zh/vbman/modbus/overview.md) - [Modbus 文档目录](/zh/vbman/modbus/README.md) - [MonthView Control](/en/packages/vbccr/datetime/monthview.md): MonthView Control - VBCCR Development Manual, complete API reference based on source code - [mWebSocketUtils 工具模块参考](/zh/vbman/websocket/utils.md) - [mWebSocketUtils Utility Module Reference](/en/vbman/websocket/utils.md) - [OptionButtonW Control](/en/packages/vbccr/buttons/optionbuttonw.md): OptionButtonW Control - VBCCR Development Manual, complete API reference based on source code - [Packet Protocol and Heartbeat Mechanism](/en/vbman/winsock/packet-protocol.md) - [Pager Control](/en/packages/vbccr/bars/pager.md): Pager Control - VBCCR Developer Reference, complete API documentation based on source code - [Pagination](/en/vbman/database/pagination.md) - [Parameter Routing & Path Segment Parsing](/en/vbman/httpserver/route-params.md) - [Parameterized Queries](/en/vbman/database/parameterized.md) - [ProgressBar Control](/en/packages/vbccr/ranges/progressbar.md): ProgressBar Control - VBCCR Development Manual, complete API reference based on source code - [Query Operations](/en/vbman/database/query.md) - [Quick Start](/en/vbman/database/quickstart.md) - [Quick Start Guide](/en/vbman/websocket/quickstart.md) - [RichTextBox Control](/en/packages/vbccr/text/richtextbox.md): RichTextBox Control - VBCCR Development Manual, complete API reference based on source code - [Router System Guide](/en/vbman/httpserver/router.md) - [Runtime API Examples](/demo/api-examples.md) - [Security Best Practices Guide](/en/vbman/httpserver/security.md) - [Serial Port Data Framing Protocol](/en/vbman/serialport/framing.md) - [SerialPort 串口收发示例(Test1)](/zh/vbman/demo/16.SerialPort.md) - [SerialPort Send/Receive Example (Test1)](/en/vbman/demo/16.SerialPort.md) - [Session 管理详解](/zh/vbman/httpserver/session.md) - [Session Management Guide](/en/vbman/httpserver/session.md) - [Set 操作](/zh/vbman/redis/set-operations.md) - [Set Operations](/en/vbman/redis/set-operations.md) - [Slider Control](/en/packages/vbccr/ranges/slider.md): Slider Control - VBCCR Development Manual, complete API reference based on source code - [Sorted Set 操作](/zh/vbman/redis/sorted-set-operations.md) - [Sorted Set Operations](/en/vbman/redis/sorted-set-operations.md) - [SpinBox Control](/en/packages/vbccr/text/spinbox.md): SpinBox Control - VBCCR Development Manual, complete API reference based on source code - [SSE 服务器端实时推送](/zh/vbman/httpserver/sse-server.md) - [SSE Server-Side Real-time Push](/en/vbman/httpserver/sse-server.md) - [Static File Serving](/en/vbman/httpserver/static-files.md) - [StatusBar Control](/en/packages/vbccr/bars/statusbar.md): StatusBar Control - VBCCR Developer Reference, complete API documentation based on source code - [String 操作](/zh/vbman/redis/string-operations.md) - [String Operations](/en/vbman/redis/string-operations.md) - [SysInfo Control](/en/packages/vbccr/system/sysinfo.md): SysInfo Control - VBCCR Development Manual, Complete API Reference Based on Source Code - [TabStrip Control](/en/packages/vbccr/views/tabstrip.md): TabStrip Control - VBCCR Developer Reference, complete API documentation based on source code - [Technical Details](/en/vbman/Toast/technical.md) - [TextBoxW Control](/en/packages/vbccr/text/textboxw.md): TextBoxW Control - VBCCR Development Manual, complete API reference based on source code - [TLS 证书配置总览](/zh/vbman/tls/overview.md) - [TLS Certificate Configuration Overview](/en/vbman/tls/overview.md) - [ToolBar Control](/en/packages/vbccr/bars/toolbar.md): ToolBar Control - VBCCR Developer Reference, complete API documentation based on source code - [Tools - 窗口工具类](/zh/vbman/tools/window.md) - [Tools - 密码工具类](/zh/vbman/tools/password.md) - [Tools - 日期时间工具类](/zh/vbman/tools/datetime.md) - [Tools - 数学工具类](/zh/vbman/tools/math.md) - [Tools - 数组工具类](/zh/vbman/tools/array.md) - [Tools - 文件系统工具类](/zh/vbman/tools/fso.md) - [Tools - 系统工具类](/zh/vbman/tools/system.md) - [Tools - 字典工具类](/zh/vbman/tools/dic.md) - [Tools - 字符串工具类](/zh/vbman/tools/string.md) - [Tools - Array Tools](/en/vbman/tools/array.md) - [Tools - Base64 编码工具](/zh/vbman/tools/base64.md) - [Tools - Base64 Encoding Utility](/en/vbman/tools/base64.md) - [Tools - CRC 计算类](/zh/vbman/tools/crc.md) - [Tools - CRC Calculation Class](/en/vbman/tools/crc.md) - [Tools - Date and Time Utilities](/en/vbman/tools/datetime.md) - [Tools - Dictionary Utilities](/en/vbman/tools/dic.md) - [Tools - File System Utilities](/en/vbman/tools/fso.md) - [Tools - HTTP 工具类](/zh/vbman/tools/http.md) - [Tools - HTTP Utility Class](/en/vbman/tools/http.md) - [Tools - Math Utility Class](/en/vbman/tools/math.md) - [Tools - Password Utility Class](/en/vbman/tools/password.md) - [Tools - String Utility Class](/en/vbman/tools/string.md) - [Tools - System Utility Class](/en/vbman/tools/system.md) - [Tools - UTF-8 编码工具类](/zh/vbman/tools/utf8.md) - [Tools - UTF-8 Encoding Utility Class](/en/vbman/tools/utf8.md) - [Tools - Window Utility Class](/en/vbman/tools/window.md) - [Tools 工具类文档索引](/zh/vbman/tools/README.md) - [Tools Documentation Index](/en/vbman/tools/README.md) - [ToolsFso 模块](/zh/vbman/tools/fso/ToolsFso.md) - [ToolsFso Module](/en/vbman/tools/fso/ToolsFso.md) - [Transaction Operations](/en/vbman/redis/transaction.md) - [Transaction Processing](/en/vbman/database/transaction.md) - [TreeView Control](/en/packages/vbccr/views/treeview.md): TreeView Control - VBCCR Developer Reference, complete API documentation based on source code - [Unicode 标签控件(LabelW)](/zh/packages/vbccr/text/labelw.md): Unicode 标签控件(LabelW) - VBCCR 开发手册,基于源码的完整 API 参考 - [Untitled](/donate/list.md) - [Untitled](/en.md) - [Untitled](/donate/list-aspman.md) - [Untitled](/donate/list-c3.md) - [Untitled](/donate/list-aspman-old.md) - [Untitled](/en/vbman/LICENSE.md) - [Untitled](/en/vbman/filesystem/zip.md) - [Untitled](/zh.md) - [Untitled](/zh/vbman/LICENSE.md) - [Untitled](/zh/vbman/devlog/_bak/dev.log.md) - [Untitled](/zh/vbman/filesystem/zip.md) - [UpDown Control](/en/packages/vbccr/ranges/updown.md): UpDown Control - VBCCR Development Manual, complete API reference based on source code - [User Cases](/en/cases.md): VBMAN user case showcase - real-world projects in IoT, industrial control, web applications and more - [Utility Methods](/en/vbman/database/utilities.md) - [VBCCR 开发手册](/zh/packages/vbccr.md): VBCCR 开发手册 - VBCCR 开发手册,基于源码的完整 API 参考 - [VBCCR Development Manual](/en/packages/vbccr.md): VBCCR Development Manual - Complete API reference based on source code - [VBMAN 多进程示例](/zh/vbman/demo/10.Multiprocessor.md) - [VBMAN 管理端示例](/zh/vbman/demo/12.AdminEnd.md) - [VBMAN 全局静态对象文档](/zh/vbman/global.md) - [VBMAN 数据库操作示例](/zh/vbman/demo/3.Database.md) - [VBMAN 天气预报实例](/zh/vbman/demo/13.Weather.md) - [VBMAN 网络数据展示示例](/zh/vbman/demo/11.NetDataShow.md) - [VBMAN 许可证使用指南](/zh/vbman/LICENSE_GUIDE.md) - [VBMAN 中间件与客户端通信示例](/zh/vbman/demo/5.MiddleWare.md) - [VBMAN 众筹项目](/zh/crowd.md) - [VBMAN Admin Panel Example](/en/vbman/demo/12.AdminEnd.md) - [VBMAN API 调用示例](/zh/vbman/demo/9.ApiCall.md) - [VBMAN API Call Example](/en/vbman/demo/9.ApiCall.md) - [VBMAN cWinsock TCP 服务端压力测试报告 📊](/zh/vbman/winsock/benchmarks.md) - [VBMAN cWinsock TCP Server Stress Test Report 📊](/en/vbman/winsock/benchmarks.md) - [VBMAN Database Operations Example](/en/vbman/demo/3.Database.md) - [VBMAN Global Static Object Documentation](/en/vbman/global.md) - [VBMAN HelloWorld 示例](/zh/vbman/demo/1.HelloWorld.md) - [VBMAN HelloWorld Example](/en/vbman/demo/1.HelloWorld.md) - [VBMAN JSON 数据处理示例](/zh/vbman/demo/4.cJson.md) - [VBMAN JSON Data Processing Example](/en/vbman/demo/4.cJson.md) - [VBMAN License Usage Guide](/en/vbman/LICENSE_GUIDE.md) - [VBMAN Middleware and Client Communication Example](/en/vbman/demo/5.MiddleWare.md) - [VBMAN Multiprocessor Example](/en/vbman/demo/10.Multiprocessor.md) - [VBMAN Network Data Display Example](/en/vbman/demo/11.NetDataShow.md) - [VBMAN SSE (Server-Sent Events) Server Push Example](/en/vbman/demo/6.SSE.md) - [VBMAN SSE(Server-Sent Events)服务器推送示例](/zh/vbman/demo/6.SSE.md) - [VBMAN SSE2 高级服务器推送示例](/zh/vbman/demo/7.SSE2.md) - [VBMAN SSE2 Advanced Server Push Example](/en/vbman/demo/7.SSE2.md) - [VBMAN Weather demo](/en/vbman/demo/13.Weather.md) - [VBMAN Webroot Static File Server Example](/en/vbman/demo/2.Webroot.md) - [VBMAN Webroot静态文件服务示例](/zh/vbman/demo/2.Webroot.md) - [VBMAN WebSocket 双向通信示例](/zh/vbman/demo/8.WebSocket.md) - [VBMAN WebSocket Bidirectional Communication Example](/en/vbman/demo/8.WebSocket.md) - [VBMAN.AI - AI 对话客户端](/zh/vbman/global/ai.md) - [VBMAN.Baidu - 百度 API 接口对象](/zh/vbman/global/baidu.md) - [VBMAN.Baidu - Baidu API Interface Object](/en/vbman/global/baidu.md) - [VBMAN.Cmd - 命令行操作对象](/zh/vbman/global/cmd.md) - [VBMAN.Cmd - Command Line Operation Object](/en/vbman/global/cmd.md) - [VBMAN.Collection - 增强集合对象](/zh/vbman/global/collection.md) - [VBMAN.Collection - Enhanced Collection Object](/en/vbman/global/collection.md) - [VBMAN.Csv - CSV 文件操作对象](/zh/vbman/global/csv.md) - [VBMAN.Csv - CSV File Operation Object](/en/vbman/global/csv.md) - [VBMAN.Db - 数据库操作对象](/zh/vbman/global/database.md) - [VBMAN.Db - Database Operation Object](/en/vbman/global/database.md) - [VBMAN.Delay - 延迟执行对象](/zh/vbman/global/delay.md) - [VBMAN.Delay - Delayed Execution Object](/en/vbman/global/delay.md) - [VBMAN.Dialog - 文件对话框对象](/zh/vbman/global/dialog.md) - [VBMAN.Dialog - File Dialog Object](/en/vbman/global/dialog.md) - [VBMAN.FileEx - 高级文件操作对象](/zh/vbman/global/fileex.md) - [VBMAN.FileEx - Advanced File Operation Object](/en/vbman/global/fileex.md) - [VBMAN.Formater - 格式化工具对象](/zh/vbman/global/formater.md) - [VBMAN.Formater - Formatting Tool Object](/en/vbman/global/formater.md) - [VBMAN.Hash - 哈希计算对象](/zh/vbman/global/crypto-hash.md) - [VBMAN.Hash - Hash Calculation Object](/en/vbman/global/crypto-hash.md) - [VBMAN.HashMAC - HMAC 消息认证码对象](/zh/vbman/global/crypto-hashmac.md) - [VBMAN.HashMAC - HMAC Message Authentication Code Object](/en/vbman/global/crypto-hashmac.md) - [VBMAN.HttpClient - HTTP 客户端对象](/zh/vbman/global/httpclient.md) - [VBMAN.HttpClient - HTTP Client Object](/en/vbman/global/httpclient.md) - [VBMAN.Image - 图片数据互转对象](/zh/vbman/global/cimage.md) - [VBMAN.Image - Image Data Conversion Object](/en/vbman/global/cimage.md) - [VBMAN.Ini - INI 配置文件操作对象](/zh/vbman/global/ini.md) - [VBMAN.Ini - INI Configuration File Object](/en/vbman/global/ini.md) - [VBMAN.Json - JSON 操作对象](/zh/vbman/global/json.md) - [VBMAN.Json - JSON Operation Object](/en/vbman/global/json.md) - [VBMAN.Logs - 日志记录对象](/zh/vbman/global/logs.md) - [VBMAN.Logs - Log Recording Object](/en/vbman/global/logs.md) - [VBMAN.Password - 密码处理对象](/zh/vbman/global/password.md) - [VBMAN.Password - Password Processing Object](/en/vbman/global/password.md) - [VBMAN.PLI - 插件接口对象](/zh/vbman/global/pli.md) - [VBMAN.PLI - Plugin Interface Object](/en/vbman/global/pli.md) - [VBMAN.QRcode - 二维码生成对象](/zh/vbman/global/qrcode.md) - [VBMAN.QRcode - QR Code Generation Object](/en/vbman/global/qrcode.md) - [VBMAN.Regedit - 注册表操作对象](/zh/vbman/global/regedit.md) - [VBMAN.Regedit - Registry Operation Object](/en/vbman/global/regedit.md) - [VBMAN.StartUp - 开机启动管理对象](/zh/vbman/global/startup.md) - [VBMAN.StartUp - Startup Management Object](/en/vbman/global/startup.md) - [VBMAN.TimeUse - 计时器对象](/zh/vbman/global/timeuse.md) - [VBMAN.TimeUse - Timer Object](/en/vbman/global/timeuse.md) - [VBMAN.Toast - 通知消息对象](/zh/vbman/global/toast.md) - [VBMAN.Toast - Notification Message Object](/en/vbman/global/toast.md) - [VBMAN.ToolsArray - 数组工具对象](/zh/vbman/global/toolsarray.md) - [VBMAN.ToolsArray - Array Tool Object](/en/vbman/global/toolsarray.md) - [VBMAN.ToolsBase64 - Base64 编解码对象](/zh/vbman/global/toolsbase64.md) - [VBMAN.ToolsBase64 - Base64 Encoding/Decoding Object](/en/vbman/global/toolsbase64.md) - [VBMAN.ToolsCrc - CRC 校验计算对象](/zh/vbman/global/toolscrc.md) - [VBMAN.ToolsCrc - CRC Checksum Calculation Object](/en/vbman/global/toolscrc.md) - [VBMAN.ToolsDic - 字典工具对象](/zh/vbman/global/toolsdic.md) - [VBMAN.ToolsDic - Dictionary Tool Object](/en/vbman/global/toolsdic.md) - [VBMAN.ToolsFso - 文件系统操作对象](/zh/vbman/global/toolsfso.md) - [VBMAN.ToolsFso - File System Operation Object](/en/vbman/global/toolsfso.md) - [VBMAN.ToolsHttp - HTTP 工具对象](/zh/vbman/global/toolshttp.md) - [VBMAN.ToolsHttp - HTTP Tool Object](/en/vbman/global/toolshttp.md) - [VBMAN.ToolsList - 列表处理对象](/zh/vbman/global/toolslist.md) - [VBMAN.ToolsList - List Processing Object](/en/vbman/global/toolslist.md) - [VBMAN.ToolsMath - 数学运算工具对象](/zh/vbman/global/toolsmath.md) - [VBMAN.ToolsMath - Mathematical Operation Tool Object](/en/vbman/global/toolsmath.md) - [VBMAN.ToolsStr - 字符串工具对象](/zh/vbman/global/toolsstr.md) - [VBMAN.ToolsStr - String Tool Object](/en/vbman/global/toolsstr.md) - [VBMAN.ToolsStream - 文件流操作对象](/zh/vbman/global/toolsstream.md) - [VBMAN.ToolsStream - File Stream Operation Object](/en/vbman/global/toolsstream.md) - [VBMAN.ToolsSystem - 系统操作对象](/zh/vbman/global/toolssystem.md) - [VBMAN.ToolsSystem - System Operation Object](/en/vbman/global/toolssystem.md) - [VBMAN.ToolsUtf8 - UTF-8 编解码对象](/zh/vbman/global/toolsutf8.md) - [VBMAN.ToolsUtf8 - UTF-8 Encoding/Decoding Object](/en/vbman/global/toolsutf8.md) - [VBMAN.ToolsWindow - 窗口操作对象](/zh/vbman/global/toolswindow.md) - [VBMAN.ToolsWindow - Window Operation Object](/en/vbman/global/toolswindow.md) - [VirtualCombo Control](/en/packages/vbccr/lists/virtualcombo.md): VirtualCombo Control - VBCCR Development Manual, complete API reference based on source code - [VListBox Control](/en/packages/vbccr/lists/vlistbox.md): VListBox Control - VBCCR Development Manual, complete API reference based on source code - [WebSocket 开发文档](/zh/vbman/demo/15.Websocket.md) - [WebSocket 类库开发文档](/zh/vbman/websocket/overview.md) - [WebSocket 类库总览](/zh/vbman/websocket/library.md) - [WebSocket Class Library Documentation](/en/vbman/websocket/overview.md) - [WebSocket Class Library Overview](/en/vbman/websocket/library.md) - [WebSocket Development Guide](/en/vbman/demo/15.Websocket.md) - [WebSocket TLS (wss://) 支持](/zh/vbman/websocket/tls.md) - [WebSocket TLS (wss://) Support](/en/vbman/websocket/tls.md) - [WebView2 Base 示例 - 最小浏览器嵌入](/zh/vbman2/demos/webview2/1.base.md) - [WebView2 Base Demo - Minimal Browser Embedding](/en/vbman2/demos/webview2/1.base.md) - [WebView2 BindDataUI 示例 - 双向数据绑定](/zh/vbman2/demos/webview2/2.bindDataUI.md) - [WebView2 BindDataUI Demo - Two-Way Data Binding](/en/vbman2/demos/webview2/2.bindDataUI.md) - [WebView2 CDP 示例 - Chrome DevTools Protocol 异步与同步调用](/zh/vbman2/demos/webview2/3.cdp.md) - [WebView2 CDP Demo - Chrome DevTools Protocol Async and Sync Calls](/en/vbman2/demos/webview2/3.cdp.md) - [WebView2 CDP Sync 示例 - 纯同步 CDP 调用](/zh/vbman2/demos/webview2/4.cdpSync.md) - [WebView2 CDP Sync Demo - Pure Synchronous CDP Calls](/en/vbman2/demos/webview2/4.cdpSync.md) - [WebView2 Cookies 示例 - Cookie 访问](/zh/vbman2/demos/webview2/5.cookies.md) - [WebView2 Cookies Demo - Cookie Access](/en/vbman2/demos/webview2/5.cookies.md) - [WebView2 Eval 示例 - JavaScript 表达式求值](/zh/vbman2/demos/webview2/6.eval.md) - [WebView2 Eval Demo - JavaScript Expression Evaluation](/en/vbman2/demos/webview2/6.eval.md) - [WebView2 IgnoreHttpsError 示例 - 忽略 HTTPS 证书错误](/zh/vbman2/demos/webview2/7.ignoreHttpsError.md) - [WebView2 IgnoreHttpsError Demo - Ignoring HTTPS Certificate Errors](/en/vbman2/demos/webview2/7.ignoreHttpsError.md) - [WebView2 LoadFile 示例 - 加载本地 HTML 文件](/zh/vbman2/demos/webview2/8.loadFile.md) - [WebView2 LoadFile Demo - Loading Local HTML Files](/en/vbman2/demos/webview2/8.loadFile.md) - [WebView2 ResFile 示例 - 从 VB6 资源文件加载 HTML](/zh/vbman2/demos/webview2/9.resFile.md) - [WebView2 ResFile Demo - Loading HTML from VB6 Resource Files](/en/vbman2/demos/webview2/9.resFile.md) - [WebView2 UserData 示例 - 多账号会话隔离](/zh/vbman2/demos/webview2/10.userData.md) - [WebView2 UserData Demo - Multi-Account Session Isolation](/en/vbman2/demos/webview2/10.userData.md) - [WebView2 UserData2 示例 - UserControl 封装 WebView2](/zh/vbman2/demos/webview2/11.userData2.md) - [WebView2 UserData2 Demo - UserControl Wrapping WebView2](/en/vbman2/demos/webview2/11.userData2.md) - [WebView2 VBA 示例 - Access 与 Excel 中使用 cWebView2Host](/zh/vbman2/demos/webview2/12.vba.md) - [WebView2 VBA Demo - Using cWebView2Host in Access and Excel](/en/vbman2/demos/webview2/12.vba.md) - [WindowedLabel Control](/en/packages/vbccr/text/windowedlabel.md): WindowedLabel Control - VBCCR Development Manual, complete API reference based on source code - [Windows 证书存储模式 (TlsCertSubject)](/zh/vbman/tls/certsubject.md) - [Windows Certificate Store Mode (TlsCertSubject)](/en/vbman/tls/certsubject.md) - [������־����](/zh/vbman/devlog/规则.md)