name5566 / leafserver Goto Github PK
View Code? Open in Web Editor NEWA game server based on Leaf framework
License: Apache License 2.0
A game server based on Leaf framework
License: Apache License 2.0
leaf关闭时
1.Skeleton里的dispatcher,没有关闭ChanTimer
2.db范例里,user的 logout里,也没有关闭 g.LinearContext
这些事应该关闭的吧?如果不关闭的话,会有什么影响吗?
运行例子失败,提示如下,
2016/08/04 09:34:55 [fatal ] open conf/server.json: The system cannot find the path specified.
exit status 1
请问如何解决?
conf/server.json是在bin目录下,我需要手动创建server.json吗
已解决,需要将leafserver\bin\conf下的server.json拷贝到leafserver\src\server\conf目录下,可解决问题
package internal
import (
"github.com/name5566/leaf/gate"
"github.com/name5566/leaf/log"
)
var agents = make(map[gate.Agent]struct{})
func init() {
skeleton.RegisterChanRPC("NewAgent", rpcNewAgent)
skeleton.RegisterChanRPC("CloseAgent", rpcCloseAgent)
}
// agent 被创建时
func rpcNewAgent(args []interface{}) {
a := args[0].(gate.Agent)
_ = a
log.Debug("new agent")
}
// agent 被关闭时
func rpcCloseAgent(args []interface{}) {
a := args[0].(gate.Agent)
_ = a
log.Debug("agent quit")
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.