随笔分类 -  GameServer

摘要:一.环境配置 Windows 10 Visual Studio 2017 安装配置 Boost http://www.cnblogs.com/49er/p/7193979.html 2 阅读全文
posted @ 2018-04-16 10:58 GamePal 阅读(922) 评论(0) 推荐(0)
摘要:发环境 Atom、phpStudy2018、Genymotion (Window10) 1.1安装Reactnative. https://reactnative.cn/docs/0.51/getting-started.html#content 1.2Android模拟器Genymotion安装 阅读全文
posted @ 2018-03-01 14:03 GamePal 阅读(286) 评论(0) 推荐(0)
摘要:一、服务端代码 MyEclipse新建Servlet #Name:StringContentServlet #Servlet/JSPMappingUrl:/StringContentServlet.do package com.jimmy.Servlets; import java.io.IOExc 阅读全文
posted @ 2017-04-18 12:20 GamePal 阅读(2484) 评论(0) 推荐(0)
摘要:UDP服务端UdpServer 1 using UnityEngine; 2 using System.Collections; 3 //引入库 4 using System.Net; 5 using System.Net.Sockets; 6 using System.Text; 7 using 阅读全文
posted @ 2017-03-23 14:10 GamePal 阅读(237) 评论(0) 推荐(0)
摘要:这里我们用Netty实现消息的接受及分发,服务器端的 handler 添加流程如图: 1 package com.netty.dispatch; 2 3 import com.netty.model.SocketModel; 4 import com.netty.protocol.LoginProt 阅读全文
posted @ 2017-03-04 00:51 GamePal 阅读(683) 评论(0) 推荐(0)
摘要:编写服务端工具类,MySQL连接及登陆信息验证,及int和byte之间的转化 MySQL用户信息表结构: 1 package com.netty.util; 2 3 import java.sql.Connection; 4 import java.sql.DriverManager; 5 impo 阅读全文
posted @ 2017-03-04 00:29 GamePal 阅读(483) 评论(0) 推荐(0)
摘要:这里主要处理二进制消息的粘包拆包 1 package com.netty.decoder; 2 3 import io.netty.handler.codec.LengthFieldBasedFrameDecoder; 4 /* 5 *后面我们在Socket Channel中移除二进制消息的前四个字 阅读全文
posted @ 2017-03-04 00:17 GamePal 阅读(364) 评论(0) 推荐(0)
摘要:开发环境:JDK1.7,Uniyt5.4.2,数据格式ProtoStuff1.08,Netty5.0.0,数据库MySQL。 代码对应关系如下: 首先实现数据模型设计,用于ProtoStuff数据传输。 这里的类服务端与客户端对应,以便消息的序列化与反序列化。 1 package com.netty 阅读全文
posted @ 2017-03-03 23:07 GamePal 阅读(815) 评论(0) 推荐(0)