• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
huoppo
博客园 首页 新随笔 联系 订阅 订阅 管理

12 2018 档案

 
通用服务器架构
摘要:目前这套服务器架构如下: 1.每个服务器启动的时候都会向MasterServer 注册(上传自己的ip,port,servertype等) 2.MasterServer收到注册消息后广播该信息给连上它的所有服务器,同时给该连上的服务器发送所有服务器的列表 3.单点服务器收到列表后, 依据上面的 连接 阅读全文
posted @ 2018-12-28 10:24 huoppo 阅读(492) 评论(0) 推荐(0)
泊爷带你学go -- 经典的继承与接口 简直吊炸天 !
摘要:package main import ( "fmt" ) type TeamBase struct { m_TeamId uint64 m_Rid uint32 m_RoomRule uint32 m_Players []uint64 } type TeamInt interface { Init() CreateTeam(accountId uint64,... 阅读全文
posted @ 2018-12-07 17:04 huoppo 阅读(194) 评论(1) 推荐(0)
泊爷带你学go -- 反射的经典玩法
摘要:package main import ( "fmt" "reflect" ) type order struct { ordId int customerId int } func createQuery(q interface{}) { t := reflect.TypeOf(q) //----NB啊 if t.String() == "main.order" ... 阅读全文
posted @ 2018-12-07 15:38 huoppo 阅读(180) 评论(0) 推荐(0)
泊爷带你学go -- redis连接池的操作
摘要:package main import ( "common" "fmt" "proto" "strconv" "time" "github.com/garyburd/redigo/redis" "github.com/gogo/protobuf/proto" ) type RedisHelper struct { redisClie... 阅读全文
posted @ 2018-12-07 14:33 huoppo 阅读(1101) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3