Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yasio http client 支持 #307

Closed
justbilt opened this issue Jul 20, 2020 · 4 comments
Closed

yasio http client 支持 #307

justbilt opened this issue Jul 20, 2020 · 4 comments

Comments

@justbilt
Copy link

目前感觉项目 Cocos 内置的两个网络库 http / websocket 都有些问题, 打算换掉, 找了一圈还是 yasio 最符合我的需求.

但是我看到文档中并没有写到 http 的支持, 搜索后看到有一个 http_client.lua 的示例, 但是没有 js 版本的. 请问 yasio 目前对 http 的支持如何?

@halx99
Copy link
Member

halx99 commented Jul 20, 2020

理论上, 你利用yasio加上一个http_parser可以实现http的完整功能,http_client.lua只是一个演示,请求和接受都是原始http数据包
yasio甚至也支持基于openssl的TLS(cocos中基本都集成了openssl), 因此https传输也是可以实现的

@halx99
Copy link
Member

halx99 commented Jul 20, 2020

yasio的核心是非阻塞多路io复用socket库,因此核心是没有http的,即使将来计划支持,应该也是以扩展的形式

@justbilt
Copy link
Author

明白, 谢谢您的回复. 我先尝试把 socket 库换了, 期待 yasio 加上 http 支持, 变成一套网络解决方案.

@halx99 halx99 added this to the HelpDesk milestone Jul 22, 2020
@halx99 halx99 added the feature label Sep 25, 2020
@halx99
Copy link
Member

halx99 commented Jun 23, 2021

@halx99 halx99 pinned this issue Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants