13 Star 14 Fork 9

foryoung365 / UVSocket

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

#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.

The MIT License (MIT) Copyright (c) 2015 foryoung365 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Server Socket and Client Socket based on libuv. 展开 收起
C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/foryoung365/UVSocket.git
git@gitee.com:foryoung365/UVSocket.git
foryoung365
UVSocket
UVSocket
master

搜索帮助