{"id":21058017,"url":"https://github.com/simdsoft/inettester","last_synced_at":"2026-02-28T18:31:51.182Z","repository":{"id":132627112,"uuid":"270926404","full_name":"simdsoft/inettester","owner":"simdsoft","description":"The CocosCreator demo project with test case tcp,udp,kcp","archived":false,"fork":false,"pushed_at":"2020-09-12T08:50:54.000Z","size":205,"stargazers_count":15,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T17:39:08.006Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simdsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-09T06:54:42.000Z","updated_at":"2025-02-08T05:54:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8fc9341-6764-4726-b2ca-218aadaceab4","html_url":"https://github.com/simdsoft/inettester","commit_stats":null,"previous_names":["simdsoft/inettester"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Finettester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Finettester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Finettester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simdsoft%2Finettester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simdsoft","download_url":"https://codeload.github.com/simdsoft/inettester/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254442429,"owners_count":22071864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T17:06:04.420Z","updated_at":"2026-02-28T18:31:51.150Z","avatar_url":"https://github.com/simdsoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# inettester\nThe CocosCreator demo project with test case tcp,udp,kcp\n\n\n# yasio简介\n - yasio是一个小巧的支持win,linux,android,ios,uwp等平台的多路io复用模型异步socket库\n - yasio同时基于时间轮盘算法实现高精度计时器, 计时器在yasio的io_service线程调度\n - yasio GitHub地址: https://github.com/yasio/yasio\n - yasio 官方群: 829884294\n\n## 接下来我们一步一步开始集成到CocosCreator使用\n注意yasio是c++库，因此是不支持web的，如果您的游戏仅发布原生平台，则可放心使用\n\n1. 在Cocos官网下载安装CocosCreator， 这里我用CocosCreator 2.3.4版本\n2.  确保以安装git-windows，下载yasio GitHub master，我这里将yasio代码down到D:\\work\\opensources目录\n    pushd D:\\work\\opensources\n    git clone https://github.com/yasio/yasio\n3. 如果要使用kcp还需要在\n    pushd D:\\work\\opensources\\yasio\n    git submodule update --init\n \n## 本教程将展示TCP, UDP, KCP通讯， 服务端也均有yasio来开，并且部署到公网主机，地址: test.yasio.org， 为简单起见，三个都是echo server, 端口分别为:\n- TCP: 5001\n- UDP: 5002\n- KCP: 5003\n\n## 步骤\n - 首先用CocosCreator创建一个HelloWorld工程, 项目名称: inettester, 这里已经建好，并且简单拼好了界面，js代码也写好了  \n   本教程主要目的是教大家如何将yasio集成进来以及如何编译进windows的simulator, 其他平台应该类似  \n - 本教程使用CocosDashboard安装Creator-2.3.4, Creator-2.3.4根路径为: D:\\CocosDashboard_1.0.6\\resources\\.editors\\Creator\\2.3.4\\  \n   以下简称: ${CREATOR_ROOT} 或 %CREATOR_ROOT%\n \n \n 1. 编译支持yasio的simulator  \n   1.1. 首先将预览由浏览器切换为模拟器  \n    在Creator安装目录搜索simulator.sln, 打开 \n    ${CREATOR_ROOT}\\resources\\cocos2d-x\\tools\\simulator\\frameworks\\runtime-src\\proj.win32  \n   1.2. 拷贝yasio/yasio文件夹到${CREATOR_ROOT}\\resources\\cocos2d-x\\external\\sources目录下:  \n   1.3. 将yasio/bindings/yasio_jsb20.cpp加入工程编译  \n   1.4. 编译simulator\n    编译完成后将${CREATOR_ROOT}\\resources\\cocos2d-x\\tools\\simulator\\frameworks\\runtime-src\\proj.win32\\Debug.win32\\simulator.exe拷贝到\n     ${CREATOR_ROOT}\\resources\\cocos2d-x\\simulator\\win32目录下  \n   \n   以上步骤完成，模拟器就集成好了yasio，就可以进行开发调试了\n    \n 2. 集成到工程, 同编译模拟器方法类似\n\n## 基于creator-2.3.4编译好的模拟器，请从release下载，注意，模拟器是vs2019编译的，可能需要安装vs2019 vc运行库\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Finettester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimdsoft%2Finettester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimdsoft%2Finettester/lists"}