GithubHelp home page GithubHelp logo

cageq / knet Goto Github PK

View Code? Open in Web Editor NEW
50.0 50.0 13.0 37.25 MB

simple morden c++ network library based on asio standalone,support tcp/udp/http/websocket and kcp wrapper.

License: Apache License 2.0

CMake 0.77% C++ 87.56% Shell 0.04% C 11.63%

knet's People

Contributors

cageq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

knet's Issues

断线重连

请问,能否提供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;
		}

`

单件写成这样应该编不过的吧?估计得写成宏才能支持多种参数的情况吧,或者能把参数保存下来么?第一次使用完整的参数,后面使用保存下来的参数?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.