摘要: #include <stdio.h> #include <string.h> extern "C" { #include <lua.h> #include <lauxlib.h> #include <lualib.h> } //#pragma comment(lib,"lua.lib") #defi 阅读全文
posted @ 2022-03-13 00:44 zzyoucan 阅读(321) 评论(0) 推荐(0) 编辑
摘要: #include <deque> #include <thread> #include <mutex> #include <condition_variable> using namespace std; deque<int> queue; mutex mtx; condition_variable 阅读全文
posted @ 2020-12-26 18:14 zzyoucan 阅读(181) 评论(0) 推荐(0) 编辑
摘要: c调用lua函数 double f (double x, double y) { double z; /* push functions and arguments */ lua_getglobal(L, "f"); /* function to be called */ lua_pushnumbe 阅读全文
posted @ 2020-11-30 19:09 zzyoucan 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-11-22 16:23 zzyoucan 阅读(130) 评论(0) 推荐(0) 编辑
摘要: //应用,传输,网络 //TCP:提供可靠数据传输,通过使用流量控制,序号,确认和定时器等技术 //拥塞控制 /*1.自动重传机制 A >B(ACK,NAK) 不知道是数据分组丢失,ACK丢失,或者二者延迟。采用的动作是重传, 发送方:1每次发送一个分组启动一个定时器 2响应定时器中断 3终止定时器 阅读全文
posted @ 2020-11-13 16:29 zzyoucan 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1.两个框架 mobile legends { 微服务架构:各系统耦合性低,rpc AccountServer DirServer LoginServer c(账号认证,角色信息,区服信息) | | ConnServer ConnServer ConnServer c GameServer Game 阅读全文
posted @ 2020-10-18 23:21 zzyoucan 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-10-18 18:58 zzyoucan 阅读(91) 评论(0) 推荐(0) 编辑
摘要: static_cast:明确隐式转换 dynamic_cast:父子类转换,运行时类型识别RTTI,有额外的开销,一般在向下转换时才使用,必须要有虚函数 reinterpret_cast:显示强转,后果自负 int main() { int n = 5; float f = 10.0f; f = n 阅读全文
posted @ 2020-10-18 15:42 zzyoucan 阅读(538) 评论(0) 推荐(0) 编辑
摘要: tars 腾讯开源,高性能,微服务,rpc框架,有一套的微服务治理平台 个人感觉很大程度上还是借鉴zero ice这个开源的框架 1.运营 --透明部署,自动发布,立体化监控 2.平台 --容错容灾,负载均衡,灰度,管理 3.通信框架 --RPC,高性能,过载保护 4.公共组件 --框架和业务使用 阅读全文
posted @ 2020-10-15 18:35 zzyoucan 阅读(409) 评论(0) 推荐(1) 编辑
摘要: 阅读全文
posted @ 2020-10-09 23:40 zzyoucan 阅读(82) 评论(0) 推荐(0) 编辑