#UVSocket
基于libuv的服务端和客户端Socket.
Server and Client socket based on libuv.
#Compile
这个工程使用premake5编译。从命令行运行:
premake5 vs2015
也可以选择生成其他你需要的visual studio版本(用premake5 --help命令查看更多选项)。打开VSbuild/UVSocket.sln文件,分别编译debug和release版本,然后运行根目录下的"Extract.bat",将所有头文件和库文件提取到项目根目录下的"publish"文件夹下.
You need premake5 to compile this project. Run this from command line:
premake5 vs2015
or other visual studio version(use premake5 --help for more details). Open VSBuild/UVSocket.sln and compile both Debug and Release version. Then run the "Extract.bat" to extract all libraries and header files to "publish" directory under project root directory.
#Supported platform
暂时只支持Windows. Linux应该也可以正常运行,但是未经测试。
Only Windows right now. But it should run well on Linux, but not be tested.
#Usage
编写一个你自己的类,继承"UVSocketCallBack.h"头文件中的IUVServerCallback 或者 IUVClientCallback(取决于你需要哪个),实现所有接口。你可以参考"TestClientSocket"和"TestServerSocket"中的用法。
Write your own class derived from IUVServerCallback or IUVClientCallback(decided by which socket do you need) in "UVSocketCallBack.h", and implement all interfaces.
You can take "TestClientSocket" and "TestServerSocket" for example.
#About Run Mode
暂时只支持同步模式,你必须在自己的线程循环中反复调用Run()来执行事件循环。 由于异步模式可能造成使用者的困惑,所以在没有找到更好的方案之前,暂时先去掉。
Only sync mode supported right now, you MUST keep calling Run() in your own thread. The async mode will make people confused, so I temporarily remove it. I am trying to find a better way to implement it.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
1. 开源生态
2. 协作、人、软件
3. 评估模型