cageq / knet Goto Github PK
View Code? Open in Web Editor NEWsimple morden c++ network library based on asio standalone,support tcp/udp/http/websocket and kcp wrapper.
License: Apache License 2.0
simple morden c++ network library based on asio standalone,support tcp/udp/http/websocket and kcp wrapper.
License: Apache License 2.0
请问,能否提供kcpclient 短线重连的例子吗?不是很熟悉asio的这种写法,十分感谢!
`template <class... P>
static T &instance(P... args)
{
if (s_ins)
{
return *s_ins;
}
std::call_once(s_once, [&]() {
s_ins = new T(args...);
});
return *s_ins;
}
static T &instance()
{
if (s_ins)
{
return *s_ins;
}
std::call_once(s_once, [&]() {
s_ins = new T();
});
return *s_ins;
}
`
单件写成这样应该编不过的吧?估计得写成宏才能支持多种参数的情况吧,或者能把参数保存下来么?第一次使用完整的参数,后面使用保存下来的参数?
The kcp sample doesn't seem to be working.
Is that right?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.