上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: 项目github地址:https://github.com/fotocj007/VertxWebApi 前一章节完成了mysql客户端的链接和基本重新,每次重新都需要写sql语句,这章优化一下mysql的一些基本处理。 优先将实体加载到内存中,需要进行mysql操作时直接读取,不需要每次都写sql语 阅读全文
posted @ 2021-07-15 15:16 Foto_CShow 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 项目github地址:https://github.com/fotocj007/VertxWebApi 前面的项目实现了一个httpserver,上传返回的消息都是json格式。现在开始实现mysql,redis,mongodb的使用。关于mysql,redis,mongodb服务器的创建这里不做详 阅读全文
posted @ 2021-07-14 17:07 Foto_CShow 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 添加测试handler 一:定义上传json,注意,mId是必须的。 1 { 2 "mId": 101, 3 "name":"cddd", 4 "age":23 5 } 二:新建上传json解析类,继承上传抽象类AbstractUpMessage。 public class DemoRequest 阅读全文
posted @ 2021-07-14 16:17 Foto_CShow 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 本节主要介绍使用消息解析和handler分发 一:定义一个常量类,储存消息id public class HandlerCode { /***** 测试接口 ******/ public static final short DAILY_LEVEL = 101; } 定义一个返回信息枚举类 1 pu 阅读全文
posted @ 2021-07-14 15:50 Foto_CShow 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 实现消息分发和handler分配:上传json根据mId字段不同提供不同的解析器,然后将消息分发到不同的handler中。 一:消息分发 1:建立消息解析。新建接口IMessageRecognizer /*** * 根据mId获取不同的解码器 * ***/ public interface IMes 阅读全文
posted @ 2021-07-14 15:33 Foto_CShow 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 消息解析:消息序列化和反序列化 上传json解析和返回json编码。 整理下工程项目 一:实现消息接口,在imp文件夹下新建接口MessageFactory 1 /****** 2 * 消息编码/解码 3 * *******/ 4 public interface MessageFactory { 阅读全文
posted @ 2021-07-14 15:14 Foto_CShow 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 关于Vertx的介绍在官方文档可以查看 https://vertx-china.github.io/docs/。网上也有许多介绍,这里就直接上项目。 一:使用idea搭建gradle项目。添加相关vertx包。 二:定义消息传递协议 这里就使用json字符串传递消息,定义mId为区分消息的标识. 上 阅读全文
posted @ 2021-07-14 14:47 Foto_CShow 阅读(846) 评论(0) 推荐(0) 编辑
摘要: 中文文档:https://vertx-china.github.io/ 官方文档:https://vertx.io/ 客户端仓库模块:https://github.com/vert-x3/vertx-awesome qq群:515203212,219655467 阅读全文
posted @ 2021-07-14 10:22 Foto_CShow 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 环境:Mac + Rider + ET6.0 一:运行Demo 1:下载ET6.0,get:https://github.com/egametang/ET 2:下载.net core 5.0。ET6.0需要 .net5.0的 3:Unity打开前端:Unity版本为 2020.3.1 4:Rider 阅读全文
posted @ 2021-03-31 10:07 Foto_CShow 阅读(1639) 评论(0) 推荐(0) 编辑
摘要: 根据ET5文档介绍,MailBoxComponent组件一般与Actor搭配使用,挂载该组件后,就可以通过Actor发送消息。 官方demo主要有两种使用方式: session.AddComponent<MailBoxComponent, string>(MailboxType.GateSessio 阅读全文
posted @ 2021-03-08 11:58 Foto_CShow 阅读(399) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页