1
This commit is contained in:
parent
70848598e4
commit
51cde732c2
@ -17,7 +17,7 @@ type app struct {
|
||||
}
|
||||
|
||||
func (this *app) GetPkgName() string {
|
||||
return "imserver"
|
||||
return "imserver_new"
|
||||
}
|
||||
|
||||
func (this *app) Run(initCb func(), unInitCb func()) {
|
||||
@ -77,6 +77,38 @@ func (this *app) AddNetMsg(hdr *f5.MsgHdr) {
|
||||
}
|
||||
|
||||
func (this *app) registerDataSources() {
|
||||
f5.GetJsStyleDb().RegisterDataSource(
|
||||
constant.GAME_DB,
|
||||
mt.Table.GameDb.GetById(0).GetHost(),
|
||||
mt.Table.GameDb.GetById(0).GetPort(),
|
||||
mt.Table.GameDb.GetById(0).GetUser(),
|
||||
mt.Table.GameDb.GetById(0).GetPasswd(),
|
||||
mt.Table.GameDb.GetById(0).GetDatabase(),
|
||||
30)
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.GAME_DB,
|
||||
mt.Table.GameDb.GetById(0).GetHost(),
|
||||
mt.Table.GameDb.GetById(0).GetPort(),
|
||||
mt.Table.GameDb.GetById(0).GetUser(),
|
||||
mt.Table.GameDb.GetById(0).GetPasswd(),
|
||||
mt.Table.GameDb.GetById(0).GetDatabase(),
|
||||
30)
|
||||
f5.GetJsStyleDb().RegisterDataSource(
|
||||
constant.FRIEND_DB,
|
||||
mt.Table.FriendDb.GetById(0).GetHost(),
|
||||
mt.Table.FriendDb.GetById(0).GetPort(),
|
||||
mt.Table.FriendDb.GetById(0).GetUser(),
|
||||
mt.Table.FriendDb.GetById(0).GetPasswd(),
|
||||
mt.Table.FriendDb.GetById(0).GetDatabase(),
|
||||
30)
|
||||
f5.GetGoStyleDb().RegisterDataSource(
|
||||
constant.FRIEND_DB,
|
||||
mt.Table.FriendDb.GetById(0).GetHost(),
|
||||
mt.Table.FriendDb.GetById(0).GetPort(),
|
||||
mt.Table.FriendDb.GetById(0).GetUser(),
|
||||
mt.Table.FriendDb.GetById(0).GetPasswd(),
|
||||
mt.Table.FriendDb.GetById(0).GetDatabase(),
|
||||
30)
|
||||
}
|
||||
|
||||
func (this *app) GetHttpListenPort() int32 {
|
||||
|
@ -31,7 +31,7 @@ const (
|
||||
const (
|
||||
GAME_DB = "gamedb"
|
||||
FRIEND_DB = "firenddb"
|
||||
GAME_ID = 206
|
||||
GAME_ID = 2006
|
||||
)
|
||||
|
||||
// im server chat
|
||||
|
Loading…
x
Reference in New Issue
Block a user