Watch 13 Star 13 Fork 8

foryoung365 / UVSocketC++MIT

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
Server Socket and Client Socket based on libuv. spread retract

Clone or download



Server and Client socket based on libuv.



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.


编写一个你自己的类,继承"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.

Comments ( 0 )

You need to Sign in for post a comment

Help Search