Ai
1 Star 0 Fork 0

guubohan/nano

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
manager.go 591 Bytes
一键复制 编辑 原始数据 按行查看 历史
Lonng 提交于 2018-12-11 06:14 +08:00 . fix imports due to github username change
package logic
import (
"log"
"github.com/lonng/nano/component"
"github.com/lonng/nano/examples/demo/tadpole/logic/protocol"
"github.com/lonng/nano/session"
)
// Manager component
type Manager struct {
component.Base
}
// NewManager returns a new manager instance
func NewManager() *Manager {
return &Manager{}
}
// Login handler was used to guest login
func (m *Manager) Login(s *session.Session, msg *protocol.JoyLoginRequest) error {
log.Println(msg)
id := s.ID()
s.Bind(id)
return s.Response(protocol.LoginResponse{
Status: protocol.LoginStatusSucc,
ID: id,
})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/guubohan/nano.git
git@gitee.com:guubohan/nano.git
guubohan
nano
nano
v0.4.0

搜索帮助